flash-sdk 9.0.1 → 9.0.2-alpha.0
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/MarketAccount.js +1 -1
- package/dist/OraclePrice.d.ts +1 -0
- package/dist/OrderAccount.d.ts +1 -0
- package/dist/PerpetualsClient.d.ts +297 -140
- package/dist/PerpetualsClient.js +641 -1030
- package/dist/PoolAccount.d.ts +4 -0
- package/dist/PoolConfig.d.ts +3 -1
- package/dist/PoolConfig.js +4 -2
- package/dist/PoolConfig.json +132 -3246
- package/dist/PoolDataClient.d.ts +1 -0
- package/dist/PositionAccount.d.ts +4 -2
- package/dist/TokenStakeAccount.d.ts +3 -2
- package/dist/TokenStakeAccount.js +2 -2
- package/dist/TokenVaultAccount.d.ts +1 -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 +3038 -1715
- package/dist/idl/perpetuals.js +3038 -1715
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/testSize.d.ts +0 -0
- package/dist/testSize.js +0 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +18 -3
- package/dist/types/index.js +6 -5
- package/dist/utils/IdlCoder.js +7 -17
- package/dist/utils/alt.js +6 -5
- package/dist/utils/anchorCpiEvents.d.ts +1 -0
- package/dist/utils/anchorCpiEvents.js +4 -4
- package/dist/utils/getReferralAccounts.d.ts +1 -1
- package/dist/utils/getReferralAccounts.js +3 -8
- package/dist/utils/index.js +6 -6
- package/dist/utils/rpc.js +9 -9
- package/package.json +1 -1
- package/dist/TradingAccount.d.ts +0 -23
- package/dist/TradingAccount.js +0 -17
package/dist/PoolAccount.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="bn.js" />
|
|
1
2
|
import { BN } from "@coral-xyz/anchor";
|
|
2
3
|
import { Pool, TokenRatios, StakeStats, CompoundingStats, Permissions } from "./types";
|
|
3
4
|
import { PublicKey } from "@solana/web3.js";
|
|
@@ -37,6 +38,9 @@ export declare class PoolAccount implements Pool {
|
|
|
37
38
|
compoundingLpPrice: BN;
|
|
38
39
|
lastUpdatedTimestamp: BN;
|
|
39
40
|
padding2: BN[];
|
|
41
|
+
feesObligationUsd: BN;
|
|
42
|
+
rebateObligationUsd: BN;
|
|
43
|
+
thresholdUsd: BN;
|
|
40
44
|
constructor(publicKey: PublicKey, parseData: Pool);
|
|
41
45
|
static from(publicKey: PublicKey, parseData: Pool): PoolAccount;
|
|
42
46
|
updatePoolData(parseData: Pool): void;
|
package/dist/PoolConfig.d.ts
CHANGED
|
@@ -67,6 +67,8 @@ export declare class PoolConfig {
|
|
|
67
67
|
tokenMint: PublicKey;
|
|
68
68
|
tokenVault: PublicKey;
|
|
69
69
|
tokenVaultTokenAccount: PublicKey;
|
|
70
|
+
rebateVault: PublicKey;
|
|
71
|
+
rebateTokenAccount: PublicKey;
|
|
70
72
|
revenueTokenAccount: PublicKey;
|
|
71
73
|
protocolVault: PublicKey;
|
|
72
74
|
protocolTokenAccount: PublicKey;
|
|
@@ -84,7 +86,7 @@ export declare class PoolConfig {
|
|
|
84
86
|
tokens: Token[];
|
|
85
87
|
custodies: CustodyConfig[];
|
|
86
88
|
markets: MarketConfig[];
|
|
87
|
-
constructor(programId: PublicKey, perpComposibilityProgramId: PublicKey, fbNftRewardProgramId: PublicKey, cluster: Cluster, poolName: string, poolAddress: PublicKey, stakedLpTokenMint: PublicKey, compoundingTokenMint: PublicKey, stakedLpVault: PublicKey, compoundingLpVault: PublicKey, lpDecimals: number, compoundingLpTokenSymbol: string, stakedLpTokenSymbol: string, perpetuals: PublicKey, transferAuthority: PublicKey, tokenMint: PublicKey, tokenVault: PublicKey, tokenVaultTokenAccount: PublicKey, revenueTokenAccount: PublicKey, protocolVault: PublicKey, protocolTokenAccount: PublicKey, multisig: PublicKey, addressLookupTableAddresses: PublicKey[], backupOracle: PublicKey, nftCollectionAddress: PublicKey, rewardDistributionProgram: {
|
|
89
|
+
constructor(programId: PublicKey, perpComposibilityProgramId: PublicKey, fbNftRewardProgramId: PublicKey, cluster: Cluster, poolName: string, poolAddress: PublicKey, stakedLpTokenMint: PublicKey, compoundingTokenMint: PublicKey, stakedLpVault: PublicKey, compoundingLpVault: PublicKey, lpDecimals: number, compoundingLpTokenSymbol: string, stakedLpTokenSymbol: string, perpetuals: PublicKey, transferAuthority: PublicKey, tokenMint: PublicKey, tokenVault: PublicKey, tokenVaultTokenAccount: PublicKey, rebateVault: PublicKey, rebateTokenAccount: PublicKey, revenueTokenAccount: PublicKey, protocolVault: PublicKey, protocolTokenAccount: PublicKey, multisig: PublicKey, addressLookupTableAddresses: PublicKey[], backupOracle: PublicKey, nftCollectionAddress: PublicKey, rewardDistributionProgram: {
|
|
88
90
|
programId: PublicKey;
|
|
89
91
|
transferAuthority: PublicKey;
|
|
90
92
|
rewardVault: PublicKey;
|
package/dist/PoolConfig.js
CHANGED
|
@@ -19,7 +19,7 @@ var web3_js_1 = require("@solana/web3.js");
|
|
|
19
19
|
var PoolConfig_json_1 = __importDefault(require("./PoolConfig.json"));
|
|
20
20
|
var types_1 = require("./types");
|
|
21
21
|
var PoolConfig = (function () {
|
|
22
|
-
function PoolConfig(programId, perpComposibilityProgramId, fbNftRewardProgramId, cluster, poolName, poolAddress, stakedLpTokenMint, compoundingTokenMint, stakedLpVault, compoundingLpVault, lpDecimals, compoundingLpTokenSymbol, stakedLpTokenSymbol, perpetuals, transferAuthority, tokenMint, tokenVault, tokenVaultTokenAccount, revenueTokenAccount, protocolVault, protocolTokenAccount, multisig, addressLookupTableAddresses, backupOracle, nftCollectionAddress, rewardDistributionProgram, tokens, custodies, markets) {
|
|
22
|
+
function PoolConfig(programId, perpComposibilityProgramId, fbNftRewardProgramId, cluster, poolName, poolAddress, stakedLpTokenMint, compoundingTokenMint, stakedLpVault, compoundingLpVault, lpDecimals, compoundingLpTokenSymbol, stakedLpTokenSymbol, perpetuals, transferAuthority, tokenMint, tokenVault, tokenVaultTokenAccount, rebateVault, rebateTokenAccount, revenueTokenAccount, protocolVault, protocolTokenAccount, multisig, addressLookupTableAddresses, backupOracle, nftCollectionAddress, rewardDistributionProgram, tokens, custodies, markets) {
|
|
23
23
|
var _this = this;
|
|
24
24
|
this.programId = programId;
|
|
25
25
|
this.perpComposibilityProgramId = perpComposibilityProgramId;
|
|
@@ -39,6 +39,8 @@ var PoolConfig = (function () {
|
|
|
39
39
|
this.tokenMint = tokenMint;
|
|
40
40
|
this.tokenVault = tokenVault;
|
|
41
41
|
this.tokenVaultTokenAccount = tokenVaultTokenAccount;
|
|
42
|
+
this.rebateVault = rebateVault;
|
|
43
|
+
this.rebateTokenAccount = rebateTokenAccount;
|
|
42
44
|
this.revenueTokenAccount = revenueTokenAccount;
|
|
43
45
|
this.protocolVault = protocolVault;
|
|
44
46
|
this.protocolTokenAccount = protocolTokenAccount;
|
|
@@ -179,7 +181,7 @@ var PoolConfig = (function () {
|
|
|
179
181
|
catch (error) {
|
|
180
182
|
console.log("ERROR: buildPoolconfigFromJson unable to load markets ");
|
|
181
183
|
}
|
|
182
|
-
return new PoolConfig(new web3_js_1.PublicKey(poolConfig.programId), new web3_js_1.PublicKey(poolConfig.perpComposibilityProgramId), new web3_js_1.PublicKey(poolConfig.fbNftRewardProgramId), poolConfig.cluster, poolConfig.poolName, new web3_js_1.PublicKey(poolConfig.poolAddress), new web3_js_1.PublicKey(poolConfig.stakedLpTokenMint), new web3_js_1.PublicKey(poolConfig.compoundingTokenMint), new web3_js_1.PublicKey(poolConfig.stakedLpVault), new web3_js_1.PublicKey(poolConfig.compoundingLpVault), poolConfig.lpDecimals, poolConfig.compoundingLpTokenSymbol, poolConfig.stakedLpTokenSymbol, new web3_js_1.PublicKey(poolConfig.perpetuals), new web3_js_1.PublicKey(poolConfig.transferAuthority), new web3_js_1.PublicKey(poolConfig.tokenMint), new web3_js_1.PublicKey(poolConfig.tokenVault), new web3_js_1.PublicKey(poolConfig.tokenVaultTokenAccount), new web3_js_1.PublicKey(poolConfig.revenueTokenAccount), new web3_js_1.PublicKey(poolConfig.protocolVault), new web3_js_1.PublicKey(poolConfig.protocolTokenAccount), new web3_js_1.PublicKey(poolConfig.multisig), addressLookupTableAddresses, new web3_js_1.PublicKey(poolConfig.backupOracle), new web3_js_1.PublicKey(poolConfig.nftCollectionAddress), {
|
|
184
|
+
return new PoolConfig(new web3_js_1.PublicKey(poolConfig.programId), new web3_js_1.PublicKey(poolConfig.perpComposibilityProgramId), new web3_js_1.PublicKey(poolConfig.fbNftRewardProgramId), poolConfig.cluster, poolConfig.poolName, new web3_js_1.PublicKey(poolConfig.poolAddress), new web3_js_1.PublicKey(poolConfig.stakedLpTokenMint), new web3_js_1.PublicKey(poolConfig.compoundingTokenMint), new web3_js_1.PublicKey(poolConfig.stakedLpVault), new web3_js_1.PublicKey(poolConfig.compoundingLpVault), poolConfig.lpDecimals, poolConfig.compoundingLpTokenSymbol, poolConfig.stakedLpTokenSymbol, new web3_js_1.PublicKey(poolConfig.perpetuals), new web3_js_1.PublicKey(poolConfig.transferAuthority), new web3_js_1.PublicKey(poolConfig.tokenMint), new web3_js_1.PublicKey(poolConfig.tokenVault), new web3_js_1.PublicKey(poolConfig.tokenVaultTokenAccount), new web3_js_1.PublicKey(poolConfig.rebateVault), new web3_js_1.PublicKey(poolConfig.rebateTokenAccount), new web3_js_1.PublicKey(poolConfig.revenueTokenAccount), new web3_js_1.PublicKey(poolConfig.protocolVault), new web3_js_1.PublicKey(poolConfig.protocolTokenAccount), new web3_js_1.PublicKey(poolConfig.multisig), addressLookupTableAddresses, new web3_js_1.PublicKey(poolConfig.backupOracle), new web3_js_1.PublicKey(poolConfig.nftCollectionAddress), {
|
|
183
185
|
programId: new web3_js_1.PublicKey(poolConfig.rewardDistributionProgram.programId),
|
|
184
186
|
rewardMint: new web3_js_1.PublicKey(poolConfig.rewardDistributionProgram.rewardMint),
|
|
185
187
|
rewardTokenAccount: new web3_js_1.PublicKey(poolConfig.rewardDistributionProgram.rewardTokenAccount),
|