flash-sdk 10.7.2 → 10.8.0-alpha.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.
@@ -1,4 +1,3 @@
1
- /// <reference types="bn.js" />
2
1
  import { BN } from "@coral-xyz/anchor";
3
2
  import { ContractOraclePrice } from "./types";
4
3
  export declare class OraclePrice {
@@ -1,4 +1,3 @@
1
- /// <reference types="bn.js" />
2
1
  import { BN } from "@coral-xyz/anchor";
3
2
  import { PublicKey } from "@solana/web3.js";
4
3
  import { LimitOrder, Order, TriggerOrder } from "./types";
@@ -1,5 +1,3 @@
1
- /// <reference types="bn.js" />
2
- /// <reference types="node" />
3
1
  import { Program, AnchorProvider, BN } from "@coral-xyz/anchor";
4
2
  import { PublicKey, TransactionInstruction, Commitment, Signer, AddressLookupTableAccount, VersionedTransaction } from "@solana/web3.js";
5
3
  import { PoolAccount } from "./PoolAccount";
@@ -20,8 +20,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
20
20
  });
21
21
  };
22
22
  var __generator = (this && this.__generator) || function (thisArg, body) {
23
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
24
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
25
  function verb(n) { return function (v) { return step([n, v]); }; }
26
26
  function step(op) {
27
27
  if (f) throw new TypeError("Generator is already executing.");
@@ -7647,7 +7647,6 @@ var PerpetualsClient = (function () {
7647
7647
  transferAuthority: poolConfig.transferAuthority,
7648
7648
  perpetuals: this.perpetuals.publicKey,
7649
7649
  pool: poolConfig.poolAddress,
7650
- custody: rewardCustodyConfig.custodyAccount,
7651
7650
  lpTokenMint: poolConfig.stakedLpTokenMint,
7652
7651
  compoundingVault: compoundingVault,
7653
7652
  compoundingTokenMint: compoundingTokenMint,
@@ -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";
@@ -72,6 +72,7 @@ export declare class PoolConfig {
72
72
  protocolTokenAccount: PublicKey;
73
73
  multisig: PublicKey;
74
74
  addressLookupTableAddresses: PublicKey[];
75
+ pusherAddressLookupTableAddress: PublicKey;
75
76
  backupOracle: PublicKey;
76
77
  nftCollectionAddress: PublicKey;
77
78
  rewardDistributionProgram: {
@@ -84,7 +85,7 @@ export declare class PoolConfig {
84
85
  tokens: Token[];
85
86
  custodies: CustodyConfig[];
86
87
  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: {
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: {
88
89
  programId: PublicKey;
89
90
  transferAuthority: PublicKey;
90
91
  rewardVault: PublicKey;
@@ -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, 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;
@@ -44,6 +44,7 @@ var PoolConfig = (function () {
44
44
  this.protocolTokenAccount = protocolTokenAccount;
45
45
  this.multisig = multisig;
46
46
  this.addressLookupTableAddresses = addressLookupTableAddresses;
47
+ this.pusherAddressLookupTableAddress = pusherAddressLookupTableAddress;
47
48
  this.backupOracle = backupOracle;
48
49
  this.nftCollectionAddress = nftCollectionAddress;
49
50
  this.rewardDistributionProgram = rewardDistributionProgram;
@@ -170,6 +171,13 @@ var PoolConfig = (function () {
170
171
  catch (error) {
171
172
  console.log("ERROR: buildPoolconfigFromJson unable to load addressLookupTableAddresses ");
172
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
+ }
173
181
  var markets;
174
182
  try {
175
183
  markets = poolConfig['markets'].map(function (i) {
@@ -179,7 +187,7 @@ var PoolConfig = (function () {
179
187
  catch (error) {
180
188
  console.log("ERROR: buildPoolconfigFromJson unable to load markets ");
181
189
  }
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), {
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), {
183
191
  programId: new web3_js_1.PublicKey(poolConfig.rewardDistributionProgram.programId),
184
192
  rewardMint: new web3_js_1.PublicKey(poolConfig.rewardDistributionProgram.rewardMint),
185
193
  rewardTokenAccount: new web3_js_1.PublicKey(poolConfig.rewardDistributionProgram.rewardTokenAccount),