flash-sdk 2.51.6 → 2.52.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/PerpetualsClient.d.ts +56 -55
- package/dist/PerpetualsClient.js +1596 -1540
- package/dist/TokenStakeAccount.d.ts +40 -0
- package/dist/TokenStakeAccount.js +47 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -198,7 +198,7 @@ export declare class PerpetualsClient {
|
|
198
198
|
reservedAmount: BN;
|
199
199
|
minReserveUsd: BN;
|
200
200
|
limitPriceBufferBps: BN;
|
201
|
-
padding: number[] | number[] | BN[] | number[] |
|
201
|
+
padding: number[] | number[] | BN[] | number[] | BN[] | number[] | number[] | BN[] | BN[];
|
202
202
|
owner: PublicKey;
|
203
203
|
stakeStats: {
|
204
204
|
pendingActivation: BN;
|
@@ -530,7 +530,7 @@ export declare class PerpetualsClient {
|
|
530
530
|
reservedAmount: BN;
|
531
531
|
minReserveUsd: BN;
|
532
532
|
limitPriceBufferBps: BN;
|
533
|
-
padding: number[] | number[] | BN[] | number[] |
|
533
|
+
padding: number[] | number[] | BN[] | number[] | BN[] | number[] | number[] | BN[] | BN[];
|
534
534
|
owner: PublicKey;
|
535
535
|
stakeStats: {
|
536
536
|
pendingActivation: BN;
|
@@ -861,7 +861,7 @@ export declare class PerpetualsClient {
|
|
861
861
|
reservedAmount: BN;
|
862
862
|
minReserveUsd: BN;
|
863
863
|
limitPriceBufferBps: BN;
|
864
|
-
padding: number[] | number[] | BN[] | number[] |
|
864
|
+
padding: number[] | number[] | BN[] | number[] | BN[] | number[] | number[] | BN[] | BN[];
|
865
865
|
owner: PublicKey;
|
866
866
|
stakeStats: {
|
867
867
|
pendingActivation: BN;
|
@@ -1196,7 +1196,7 @@ export declare class PerpetualsClient {
|
|
1196
1196
|
reservedAmount: BN;
|
1197
1197
|
minReserveUsd: BN;
|
1198
1198
|
limitPriceBufferBps: BN;
|
1199
|
-
padding: number[] | number[] | BN[] | number[] |
|
1199
|
+
padding: number[] | number[] | BN[] | number[] | BN[] | number[] | number[] | BN[] | BN[];
|
1200
1200
|
owner: PublicKey;
|
1201
1201
|
stakeStats: {
|
1202
1202
|
pendingActivation: BN;
|
@@ -1530,7 +1530,7 @@ export declare class PerpetualsClient {
|
|
1530
1530
|
reservedAmount: BN;
|
1531
1531
|
minReserveUsd: BN;
|
1532
1532
|
limitPriceBufferBps: BN;
|
1533
|
-
padding: number[] | number[] | BN[] | number[] |
|
1533
|
+
padding: number[] | number[] | BN[] | number[] | BN[] | number[] | number[] | BN[] | BN[];
|
1534
1534
|
owner: PublicKey;
|
1535
1535
|
stakeStats: {
|
1536
1536
|
pendingActivation: BN;
|
@@ -1736,6 +1736,7 @@ export declare class PerpetualsClient {
|
|
1736
1736
|
tokenStakeAccount: PublicKey;
|
1737
1737
|
burnt: boolean;
|
1738
1738
|
}>;
|
1739
|
+
getPositionData: (position: PositionAccount, poolConfig: PoolConfig) => Promise<any>;
|
1739
1740
|
getOrderAccount: (orderAccountKey: PublicKey) => Promise<{
|
1740
1741
|
pool: PublicKey;
|
1741
1742
|
mint: PublicKey;
|
@@ -1861,7 +1862,7 @@ export declare class PerpetualsClient {
|
|
1861
1862
|
reservedAmount: BN;
|
1862
1863
|
minReserveUsd: BN;
|
1863
1864
|
limitPriceBufferBps: BN;
|
1864
|
-
padding: number[] | number[] | BN[] | number[] |
|
1865
|
+
padding: number[] | number[] | BN[] | number[] | BN[] | number[] | number[] | BN[] | BN[];
|
1865
1866
|
owner: PublicKey;
|
1866
1867
|
stakeStats: {
|
1867
1868
|
pendingActivation: BN;
|
@@ -2192,7 +2193,7 @@ export declare class PerpetualsClient {
|
|
2192
2193
|
reservedAmount: BN;
|
2193
2194
|
minReserveUsd: BN;
|
2194
2195
|
limitPriceBufferBps: BN;
|
2195
|
-
padding: number[] | number[] | BN[] | number[] |
|
2196
|
+
padding: number[] | number[] | BN[] | number[] | BN[] | number[] | number[] | BN[] | BN[];
|
2196
2197
|
owner: PublicKey;
|
2197
2198
|
stakeStats: {
|
2198
2199
|
pendingActivation: BN;
|
@@ -2523,7 +2524,7 @@ export declare class PerpetualsClient {
|
|
2523
2524
|
reservedAmount: BN;
|
2524
2525
|
minReserveUsd: BN;
|
2525
2526
|
limitPriceBufferBps: BN;
|
2526
|
-
padding: number[] | number[] | BN[] | number[] |
|
2527
|
+
padding: number[] | number[] | BN[] | number[] | BN[] | number[] | number[] | BN[] | BN[];
|
2527
2528
|
owner: PublicKey;
|
2528
2529
|
stakeStats: {
|
2529
2530
|
pendingActivation: BN;
|
@@ -2904,7 +2905,7 @@ export declare class PerpetualsClient {
|
|
2904
2905
|
reservedAmount: BN;
|
2905
2906
|
minReserveUsd: BN;
|
2906
2907
|
limitPriceBufferBps: BN;
|
2907
|
-
padding: number[] | number[] | BN[] | number[] |
|
2908
|
+
padding: number[] | number[] | BN[] | number[] | BN[] | number[] | number[] | BN[] | BN[];
|
2908
2909
|
owner: PublicKey;
|
2909
2910
|
stakeStats: {
|
2910
2911
|
pendingActivation: BN;
|
@@ -3235,7 +3236,7 @@ export declare class PerpetualsClient {
|
|
3235
3236
|
reservedAmount: BN;
|
3236
3237
|
minReserveUsd: BN;
|
3237
3238
|
limitPriceBufferBps: BN;
|
3238
|
-
padding: number[] | number[] | BN[] | number[] |
|
3239
|
+
padding: number[] | number[] | BN[] | number[] | BN[] | number[] | number[] | BN[] | BN[];
|
3239
3240
|
owner: PublicKey;
|
3240
3241
|
stakeStats: {
|
3241
3242
|
pendingActivation: BN;
|
@@ -3566,7 +3567,7 @@ export declare class PerpetualsClient {
|
|
3566
3567
|
reservedAmount: BN;
|
3567
3568
|
minReserveUsd: BN;
|
3568
3569
|
limitPriceBufferBps: BN;
|
3569
|
-
padding: number[] | number[] | BN[] | number[] |
|
3570
|
+
padding: number[] | number[] | BN[] | number[] | BN[] | number[] | number[] | BN[] | BN[];
|
3570
3571
|
owner: PublicKey;
|
3571
3572
|
stakeStats: {
|
3572
3573
|
pendingActivation: BN;
|
@@ -3897,7 +3898,7 @@ export declare class PerpetualsClient {
|
|
3897
3898
|
reservedAmount: BN;
|
3898
3899
|
minReserveUsd: BN;
|
3899
3900
|
limitPriceBufferBps: BN;
|
3900
|
-
padding: number[] | number[] | BN[] | number[] |
|
3901
|
+
padding: number[] | number[] | BN[] | number[] | BN[] | number[] | number[] | BN[] | BN[];
|
3901
3902
|
owner: PublicKey;
|
3902
3903
|
stakeStats: {
|
3903
3904
|
pendingActivation: BN;
|
@@ -4228,7 +4229,7 @@ export declare class PerpetualsClient {
|
|
4228
4229
|
reservedAmount: BN;
|
4229
4230
|
minReserveUsd: BN;
|
4230
4231
|
limitPriceBufferBps: BN;
|
4231
|
-
padding: number[] | number[] | BN[] | number[] |
|
4232
|
+
padding: number[] | number[] | BN[] | number[] | BN[] | number[] | number[] | BN[] | BN[];
|
4232
4233
|
owner: PublicKey;
|
4233
4234
|
stakeStats: {
|
4234
4235
|
pendingActivation: BN;
|
@@ -4437,13 +4438,6 @@ export declare class PerpetualsClient {
|
|
4437
4438
|
getAccountDiscriminator: (name: string) => Buffer;
|
4438
4439
|
log: (...message: string[]) => void;
|
4439
4440
|
prettyPrint: (object: object) => void;
|
4440
|
-
init: (admins: PublicKey[], config: any) => Promise<void>;
|
4441
|
-
setAdminSigners: (admins: PublicKey[], minSignatures: number) => Promise<void>;
|
4442
|
-
addPool: (name: string, maxAumUsd: BN, permissions: Permissions, metadataSymbol: string, metadataTitle: string, metadataUri: string, stakingFeeShareBps: BN, vpVolumeFactor: number) => Promise<void>;
|
4443
|
-
removePool: (name: string) => Promise<void>;
|
4444
|
-
addCustody: (poolName: string, tokenMint: PublicKey, isStable: boolean, isVirtual: boolean, oracle: OracleParams, pricing: PricingParams, permissions: Permissions, fees: Fees, borrowRate: BorrowRateParams, ratios: TokenRatios[], depegAdjustment: boolean) => Promise<void>;
|
4445
|
-
editCustody: (poolName: string, tokenMint: PublicKey, isStable: boolean, oracle: OracleParams, pricing: PricingParams, permissions: Permissions, fees: Fees, borrowRate: BorrowRateParams, ratios: TokenRatios[]) => Promise<void>;
|
4446
|
-
removeCustody: (poolName: string, tokenMint: PublicKey, ratios: TokenRatios[], poolConfig: PoolConfig) => Promise<void>;
|
4447
4441
|
liquidate: (positionAccount: PublicKey, poolConfig: PoolConfig, tokenMint: PublicKey, collateralMint: PublicKey, marketPk: PublicKey) => Promise<TransactionInstruction>;
|
4448
4442
|
getApyPercentageUi: (rewardCustodyAccount: CustodyAccount, previousSnapShotRewardPerLpStaked: BN, lpTokenUsdPrice: BN) => string;
|
4449
4443
|
getAddLiquidityAmountAndFeeSync: (amountIn: BN, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, lpTokenSupplyAmount: BN, poolAumUsdMax: BN, poolConfig: PoolConfig) => AddLiquidityAmountAndFee;
|
@@ -4519,6 +4513,7 @@ export declare class PerpetualsClient {
|
|
4519
4513
|
discountBn: BN;
|
4520
4514
|
};
|
4521
4515
|
getIndexPriceAtParticularTime: (poolConfig: PoolConfig, targetPricesAtT1Ui: Number[], targetPricesAtT2Ui: Number[], tokenRatiosAtT2BN: BN[]) => string;
|
4516
|
+
getUserClaimableRevenueAmount: (POOL_CONFIG: PoolConfig, userPublicKey: PublicKey, enableDebuglogs?: boolean) => Promise<BN>;
|
4522
4517
|
getStakedLpTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
4523
4518
|
getAssetsUnderManagement: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
4524
4519
|
getAddLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined) => Promise<{
|
@@ -4618,14 +4613,6 @@ export declare class PerpetualsClient {
|
|
4618
4613
|
instructions: TransactionInstruction[];
|
4619
4614
|
additionalSigners: Signer[];
|
4620
4615
|
}>;
|
4621
|
-
initStake: (stakingFeeShareBps: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
4622
|
-
instructions: TransactionInstruction[];
|
4623
|
-
additionalSigners: Signer[];
|
4624
|
-
}>;
|
4625
|
-
initCompounding: (feeShareBps: BN, metadataTitle: string, metadataSymbol: string, metadataUri: string, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
4626
|
-
instructions: TransactionInstruction[];
|
4627
|
-
additionalSigners: Signer[];
|
4628
|
-
}>;
|
4629
4616
|
depositStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
4630
4617
|
instructions: TransactionInstruction[];
|
4631
4618
|
additionalSigners: Signer[];
|
@@ -4649,19 +4636,23 @@ export declare class PerpetualsClient {
|
|
4649
4636
|
instructions: TransactionInstruction[];
|
4650
4637
|
additionalSigners: Signer[];
|
4651
4638
|
}>;
|
4652
|
-
|
4639
|
+
addCompoundingLiquidity: (amountIn: BN, minCompoundingAmountOut: BN, inTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined) => Promise<{
|
4653
4640
|
instructions: TransactionInstruction[];
|
4654
4641
|
additionalSigners: Signer[];
|
4655
4642
|
}>;
|
4656
|
-
|
4643
|
+
removeCompoundingLiquidity: (compoundingAmountIn: BN, minAmountOut: BN, outTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined) => Promise<{
|
4657
4644
|
instructions: TransactionInstruction[];
|
4658
4645
|
additionalSigners: Signer[];
|
4659
4646
|
}>;
|
4660
|
-
|
4647
|
+
migrateStake: (amount: BN, rewardTokenMint: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean) => Promise<{
|
4661
4648
|
instructions: TransactionInstruction[];
|
4662
4649
|
additionalSigners: Signer[];
|
4663
4650
|
}>;
|
4664
|
-
|
4651
|
+
migrateFlp: (amount: BN, rewardTokenMint: PublicKey, poolConfig: PoolConfig) => Promise<{
|
4652
|
+
instructions: TransactionInstruction[];
|
4653
|
+
additionalSigners: Signer[];
|
4654
|
+
}>;
|
4655
|
+
compoundingFee: (poolConfig: PoolConfig, rewardTokenSymbol?: string) => Promise<{
|
4665
4656
|
instructions: TransactionInstruction[];
|
4666
4657
|
additionalSigners: Signer[];
|
4667
4658
|
}>;
|
@@ -4693,14 +4684,6 @@ export declare class PerpetualsClient {
|
|
4693
4684
|
instructions: TransactionInstruction[];
|
4694
4685
|
additionalSigners: Signer[];
|
4695
4686
|
}>;
|
4696
|
-
distributeTokenReward: (amount: BN, epochCount: number, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
4697
|
-
instructions: TransactionInstruction[];
|
4698
|
-
additionalSigners: Signer[];
|
4699
|
-
}>;
|
4700
|
-
setTokenReward: (owner: PublicKey, amount: BN, epochCount: number, poolConfig: PoolConfig) => Promise<{
|
4701
|
-
instructions: TransactionInstruction[];
|
4702
|
-
additionalSigners: Signer[];
|
4703
|
-
}>;
|
4704
4687
|
collectTokenReward: (owner: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean) => Promise<{
|
4705
4688
|
instructions: TransactionInstruction[];
|
4706
4689
|
additionalSigners: Signer[];
|
@@ -4709,10 +4692,6 @@ export declare class PerpetualsClient {
|
|
4709
4692
|
instructions: TransactionInstruction[];
|
4710
4693
|
additionalSigners: Signer[];
|
4711
4694
|
}>;
|
4712
|
-
setTokenStakeLevel: (owner: PublicKey, stakeLevel: number) => Promise<{
|
4713
|
-
instructions: TransactionInstruction[];
|
4714
|
-
additionalSigners: Signer[];
|
4715
|
-
}>;
|
4716
4695
|
initRewardVault: (nftCount: BN, rewardSymbol: string, collectionMint: PublicKey, poolConfig: PoolConfig) => Promise<{
|
4717
4696
|
instructions: TransactionInstruction[];
|
4718
4697
|
additionalSigners: Signer[];
|
@@ -4781,7 +4760,18 @@ export declare class PerpetualsClient {
|
|
4781
4760
|
instructions: TransactionInstruction[];
|
4782
4761
|
additionalSigners: Signer[];
|
4783
4762
|
}>;
|
4784
|
-
|
4763
|
+
sendTransaction(ixs: TransactionInstruction[], opts?: SendTransactionOpts): Promise<string>;
|
4764
|
+
sendTransactionV3(ixs: TransactionInstruction[], opts?: SendTransactionOpts): Promise<{
|
4765
|
+
signature: string;
|
4766
|
+
versionedTransaction: VersionedTransaction;
|
4767
|
+
}>;
|
4768
|
+
init: (admins: PublicKey[], config: any) => Promise<void>;
|
4769
|
+
setAdminSigners: (admins: PublicKey[], minSignatures: number) => Promise<void>;
|
4770
|
+
addPool: (name: string, maxAumUsd: BN, permissions: Permissions, metadataSymbol: string, metadataTitle: string, metadataUri: string, stakingFeeShareBps: BN, vpVolumeFactor: number) => Promise<void>;
|
4771
|
+
removePool: (name: string) => Promise<void>;
|
4772
|
+
addCustody: (poolName: string, tokenMint: PublicKey, isStable: boolean, isVirtual: boolean, oracle: OracleParams, pricing: PricingParams, permissions: Permissions, fees: Fees, borrowRate: BorrowRateParams, ratios: TokenRatios[], depegAdjustment: boolean) => Promise<void>;
|
4773
|
+
editCustody: (poolName: string, tokenMint: PublicKey, isStable: boolean, oracle: OracleParams, pricing: PricingParams, permissions: Permissions, fees: Fees, borrowRate: BorrowRateParams, ratios: TokenRatios[]) => Promise<void>;
|
4774
|
+
removeCustody: (poolName: string, tokenMint: PublicKey, ratios: TokenRatios[], poolConfig: PoolConfig) => Promise<void>;
|
4785
4775
|
protocolWithdrawFees: (rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
4786
4776
|
instructions: TransactionInstruction[];
|
4787
4777
|
additionalSigners: Signer[];
|
@@ -4811,33 +4801,44 @@ export declare class PerpetualsClient {
|
|
4811
4801
|
instructions: TransactionInstruction[];
|
4812
4802
|
additionalSigners: Signer[];
|
4813
4803
|
}>;
|
4814
|
-
|
4804
|
+
renameFlp: (flag: BN, lpTokenName: string, lpTokenSymbol: string, lpTokenUri: string, poolConfig: PoolConfig) => Promise<{
|
4815
4805
|
instructions: TransactionInstruction[];
|
4816
4806
|
additionalSigners: Signer[];
|
4817
4807
|
}>;
|
4818
|
-
|
4808
|
+
initStake: (stakingFeeShareBps: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
4819
4809
|
instructions: TransactionInstruction[];
|
4820
4810
|
additionalSigners: Signer[];
|
4821
4811
|
}>;
|
4822
|
-
|
4812
|
+
initCompounding: (feeShareBps: BN, metadataTitle: string, metadataSymbol: string, metadataUri: string, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
4823
4813
|
instructions: TransactionInstruction[];
|
4824
4814
|
additionalSigners: Signer[];
|
4825
4815
|
}>;
|
4826
|
-
|
4816
|
+
initTokenVault: (token_permissions: TokenPermissions, tokens_to_distribute: BN, withdrawTimeLimit: BN, withdrawInstantFee: BN, stakeLevel: BN[], poolConfig: PoolConfig) => Promise<{
|
4827
4817
|
instructions: TransactionInstruction[];
|
4828
4818
|
additionalSigners: Signer[];
|
4829
4819
|
}>;
|
4830
|
-
|
4820
|
+
setTokenVaultConfig: (token_permissions: TokenPermissions, withdrawTimeLimit: BN, withdrawInstantFee: BN, stakeLevel: BN[], poolConfig: PoolConfig) => Promise<{
|
4831
4821
|
instructions: TransactionInstruction[];
|
4832
4822
|
additionalSigners: Signer[];
|
4833
4823
|
}>;
|
4834
|
-
|
4824
|
+
withdrawInstantFee: (poolConfig: PoolConfig) => Promise<{
|
4835
4825
|
instructions: TransactionInstruction[];
|
4836
4826
|
additionalSigners: Signer[];
|
4837
4827
|
}>;
|
4838
|
-
|
4839
|
-
|
4840
|
-
|
4841
|
-
|
4828
|
+
initRevenueTokenAccount: (feeShareBps: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
4829
|
+
instructions: TransactionInstruction[];
|
4830
|
+
additionalSigners: Signer[];
|
4831
|
+
}>;
|
4832
|
+
distributeTokenReward: (amount: BN, epochCount: number, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
4833
|
+
instructions: TransactionInstruction[];
|
4834
|
+
additionalSigners: Signer[];
|
4835
|
+
}>;
|
4836
|
+
setTokenStakeLevel: (owner: PublicKey, stakeLevel: number) => Promise<{
|
4837
|
+
instructions: TransactionInstruction[];
|
4838
|
+
additionalSigners: Signer[];
|
4839
|
+
}>;
|
4840
|
+
setTokenReward: (owner: PublicKey, amount: BN, epochCount: number, poolConfig: PoolConfig) => Promise<{
|
4841
|
+
instructions: TransactionInstruction[];
|
4842
|
+
additionalSigners: Signer[];
|
4842
4843
|
}>;
|
4843
4844
|
}
|