flash-sdk 10.5.1 → 10.5.3-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 +0 -1
- package/dist/OrderAccount.d.ts +0 -1
- package/dist/PerpetualsClient.d.ts +293 -148
- package/dist/PerpetualsClient.js +753 -1080
- package/dist/PoolAccount.d.ts +3 -1
- package/dist/PoolConfig.d.ts +4 -1
- package/dist/PoolConfig.js +12 -2
- package/dist/PoolConfig.json +1040 -525
- package/dist/PoolDataClient.d.ts +0 -1
- package/dist/PositionAccount.d.ts +3 -3
- package/dist/TokenStakeAccount.d.ts +2 -3
- package/dist/TokenStakeAccount.js +2 -2
- package/dist/TokenVaultAccount.d.ts +0 -1
- package/dist/ViewHelper.js +2 -2
- package/dist/backupOracle.d.ts +0 -1
- package/dist/backupOracle.js +6 -6
- package/dist/constants/index.d.ts +0 -1
- package/dist/idl/perpetuals.d.ts +3916 -2425
- package/dist/idl/perpetuals.js +4008 -2517
- 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 +25 -6
- package/dist/types/index.js +6 -5
- package/dist/utils/IdlCoder.js +17 -7
- package/dist/utils/alt.js +5 -6
- package/dist/utils/anchorCpiEvents.d.ts +0 -1
- 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 -24
- package/dist/TradingAccount.js +0 -17
package/dist/PoolAccount.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="bn.js" />
|
|
2
1
|
import { BN } from "@coral-xyz/anchor";
|
|
3
2
|
import { Pool, TokenRatios, StakeStats, CompoundingStats, Permissions } from "./types";
|
|
4
3
|
import { PublicKey } from "@solana/web3.js";
|
|
@@ -38,6 +37,9 @@ export declare class PoolAccount implements Pool {
|
|
|
38
37
|
compoundingLpPrice: BN;
|
|
39
38
|
lastUpdatedTimestamp: BN;
|
|
40
39
|
padding2: BN[];
|
|
40
|
+
feesObligationUsd: BN;
|
|
41
|
+
rebateObligationUsd: BN;
|
|
42
|
+
thresholdUsd: BN;
|
|
41
43
|
constructor(publicKey: PublicKey, parseData: Pool);
|
|
42
44
|
static from(publicKey: PublicKey, parseData: Pool): PoolAccount;
|
|
43
45
|
updatePoolData(parseData: Pool): void;
|
package/dist/PoolConfig.d.ts
CHANGED
|
@@ -67,11 +67,14 @@ 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;
|
|
73
75
|
multisig: PublicKey;
|
|
74
76
|
addressLookupTableAddresses: PublicKey[];
|
|
77
|
+
pusherAddressLookupTableAddress: PublicKey;
|
|
75
78
|
backupOracle: PublicKey;
|
|
76
79
|
nftCollectionAddress: PublicKey;
|
|
77
80
|
rewardDistributionProgram: {
|
|
@@ -84,7 +87,7 @@ export declare class PoolConfig {
|
|
|
84
87
|
tokens: Token[];
|
|
85
88
|
custodies: CustodyConfig[];
|
|
86
89
|
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: {
|
|
90
|
+
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[], pusherAddressLookupTableAddress: PublicKey, backupOracle: PublicKey, nftCollectionAddress: PublicKey, rewardDistributionProgram: {
|
|
88
91
|
programId: PublicKey;
|
|
89
92
|
transferAuthority: PublicKey;
|
|
90
93
|
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, pusherAddressLookupTableAddress, backupOracle, nftCollectionAddress, rewardDistributionProgram, tokens, custodies, markets) {
|
|
23
23
|
var _this = this;
|
|
24
24
|
this.programId = programId;
|
|
25
25
|
this.perpComposibilityProgramId = perpComposibilityProgramId;
|
|
@@ -39,11 +39,14 @@ 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;
|
|
45
47
|
this.multisig = multisig;
|
|
46
48
|
this.addressLookupTableAddresses = addressLookupTableAddresses;
|
|
49
|
+
this.pusherAddressLookupTableAddress = pusherAddressLookupTableAddress;
|
|
47
50
|
this.backupOracle = backupOracle;
|
|
48
51
|
this.nftCollectionAddress = nftCollectionAddress;
|
|
49
52
|
this.rewardDistributionProgram = rewardDistributionProgram;
|
|
@@ -170,6 +173,13 @@ var PoolConfig = (function () {
|
|
|
170
173
|
catch (error) {
|
|
171
174
|
console.log("ERROR: buildPoolconfigFromJson unable to load addressLookupTableAddresses ");
|
|
172
175
|
}
|
|
176
|
+
var pusherAddressLookupTableAddress;
|
|
177
|
+
try {
|
|
178
|
+
pusherAddressLookupTableAddress = new web3_js_1.PublicKey(poolConfig['pusherAddressLookupTableAddress']);
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
console.log("ERROR: buildPoolconfigFromJson unable to load pusherAddressLookupTableAddress ");
|
|
182
|
+
}
|
|
173
183
|
var markets;
|
|
174
184
|
try {
|
|
175
185
|
markets = poolConfig['markets'].map(function (i) {
|
|
@@ -179,7 +189,7 @@ var PoolConfig = (function () {
|
|
|
179
189
|
catch (error) {
|
|
180
190
|
console.log("ERROR: buildPoolconfigFromJson unable to load markets ");
|
|
181
191
|
}
|
|
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), {
|
|
192
|
+
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, pusherAddressLookupTableAddress, new web3_js_1.PublicKey(poolConfig.backupOracle), new web3_js_1.PublicKey(poolConfig.nftCollectionAddress), {
|
|
183
193
|
programId: new web3_js_1.PublicKey(poolConfig.rewardDistributionProgram.programId),
|
|
184
194
|
rewardMint: new web3_js_1.PublicKey(poolConfig.rewardDistributionProgram.rewardMint),
|
|
185
195
|
rewardTokenAccount: new web3_js_1.PublicKey(poolConfig.rewardDistributionProgram.rewardTokenAccount),
|