flash-sdk 9.0.5-alpha.7 → 9.1.0-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/PerpetualsClient.d.ts +129 -286
- package/dist/PerpetualsClient.js +745 -580
- package/dist/PoolAccount.d.ts +0 -3
- package/dist/PoolConfig.d.ts +2 -3
- package/dist/PoolConfig.js +10 -4
- package/dist/PoolConfig.json +4428 -167
- package/dist/PositionAccount.d.ts +2 -3
- package/dist/TokenStakeAccount.d.ts +2 -2
- package/dist/TokenStakeAccount.js +2 -2
- package/dist/TradingAccount.d.ts +23 -0
- package/dist/TradingAccount.js +17 -0
- package/dist/backupOracle.d.ts +1 -0
- package/dist/backupOracle.js +3 -3
- package/dist/idl/perpetuals.d.ts +1676 -3274
- package/dist/idl/perpetuals.js +1668 -3266
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +5 -22
- package/dist/types/index.js +2 -3
- package/dist/utils/getReferralAccounts.d.ts +1 -1
- package/dist/utils/getReferralAccounts.js +8 -3
- package/package.json +1 -1
- package/dist/testSize.d.ts +0 -0
- package/dist/testSize.js +0 -0
package/dist/PoolAccount.d.ts
CHANGED
|
@@ -37,9 +37,6 @@ export declare class PoolAccount implements Pool {
|
|
|
37
37
|
compoundingLpPrice: BN;
|
|
38
38
|
lastUpdatedTimestamp: BN;
|
|
39
39
|
padding2: BN[];
|
|
40
|
-
feesObligationUsd: BN;
|
|
41
|
-
rebateObligationUsd: BN;
|
|
42
|
-
thresholdUsd: BN;
|
|
43
40
|
constructor(publicKey: PublicKey, parseData: Pool);
|
|
44
41
|
static from(publicKey: PublicKey, parseData: Pool): PoolAccount;
|
|
45
42
|
updatePoolData(parseData: Pool): void;
|
package/dist/PoolConfig.d.ts
CHANGED
|
@@ -67,13 +67,12 @@ export declare class PoolConfig {
|
|
|
67
67
|
tokenMint: PublicKey;
|
|
68
68
|
tokenVault: PublicKey;
|
|
69
69
|
tokenVaultTokenAccount: PublicKey;
|
|
70
|
-
rebateVault: PublicKey;
|
|
71
|
-
rebateTokenAccount: PublicKey;
|
|
72
70
|
revenueTokenAccount: PublicKey;
|
|
73
71
|
protocolVault: PublicKey;
|
|
74
72
|
protocolTokenAccount: PublicKey;
|
|
75
73
|
multisig: PublicKey;
|
|
76
74
|
addressLookupTableAddresses: PublicKey[];
|
|
75
|
+
pusherAddressLookupTableAddress: PublicKey;
|
|
77
76
|
backupOracle: PublicKey;
|
|
78
77
|
nftCollectionAddress: PublicKey;
|
|
79
78
|
rewardDistributionProgram: {
|
|
@@ -86,7 +85,7 @@ export declare class PoolConfig {
|
|
|
86
85
|
tokens: Token[];
|
|
87
86
|
custodies: CustodyConfig[];
|
|
88
87
|
markets: MarketConfig[];
|
|
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,
|
|
88
|
+
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[], pusherAddressLookupTableAddress: PublicKey, backupOracle: PublicKey, nftCollectionAddress: PublicKey, rewardDistributionProgram: {
|
|
90
89
|
programId: PublicKey;
|
|
91
90
|
transferAuthority: PublicKey;
|
|
92
91
|
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,
|
|
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, pusherAddressLookupTableAddress, backupOracle, nftCollectionAddress, rewardDistributionProgram, tokens, custodies, markets) {
|
|
23
23
|
var _this = this;
|
|
24
24
|
this.programId = programId;
|
|
25
25
|
this.perpComposibilityProgramId = perpComposibilityProgramId;
|
|
@@ -39,13 +39,12 @@ 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;
|
|
44
42
|
this.revenueTokenAccount = revenueTokenAccount;
|
|
45
43
|
this.protocolVault = protocolVault;
|
|
46
44
|
this.protocolTokenAccount = protocolTokenAccount;
|
|
47
45
|
this.multisig = multisig;
|
|
48
46
|
this.addressLookupTableAddresses = addressLookupTableAddresses;
|
|
47
|
+
this.pusherAddressLookupTableAddress = pusherAddressLookupTableAddress;
|
|
49
48
|
this.backupOracle = backupOracle;
|
|
50
49
|
this.nftCollectionAddress = nftCollectionAddress;
|
|
51
50
|
this.rewardDistributionProgram = rewardDistributionProgram;
|
|
@@ -172,6 +171,13 @@ var PoolConfig = (function () {
|
|
|
172
171
|
catch (error) {
|
|
173
172
|
console.log("ERROR: buildPoolconfigFromJson unable to load addressLookupTableAddresses ");
|
|
174
173
|
}
|
|
174
|
+
var pusherAddressLookupTableAddress;
|
|
175
|
+
try {
|
|
176
|
+
pusherAddressLookupTableAddress = new web3_js_1.PublicKey(poolConfig['pusherAddressLookupTableAddress']);
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
console.log("ERROR: buildPoolconfigFromJson unable to load pusherAddressLookupTableAddress ");
|
|
180
|
+
}
|
|
175
181
|
var markets;
|
|
176
182
|
try {
|
|
177
183
|
markets = poolConfig['markets'].map(function (i) {
|
|
@@ -181,7 +187,7 @@ var PoolConfig = (function () {
|
|
|
181
187
|
catch (error) {
|
|
182
188
|
console.log("ERROR: buildPoolconfigFromJson unable to load markets ");
|
|
183
189
|
}
|
|
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.
|
|
190
|
+
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, pusherAddressLookupTableAddress, new web3_js_1.PublicKey(poolConfig.backupOracle), new web3_js_1.PublicKey(poolConfig.nftCollectionAddress), {
|
|
185
191
|
programId: new web3_js_1.PublicKey(poolConfig.rewardDistributionProgram.programId),
|
|
186
192
|
rewardMint: new web3_js_1.PublicKey(poolConfig.rewardDistributionProgram.rewardMint),
|
|
187
193
|
rewardTokenAccount: new web3_js_1.PublicKey(poolConfig.rewardDistributionProgram.rewardTokenAccount),
|