flash-sdk 2.54.9-alpha.0 → 2.54.11-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.
@@ -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.");
@@ -1990,7 +1990,7 @@ var PerpetualsClient = (function () {
1990
1990
  var custodies, custodyMetas, marketMetas, _a, custodies_5, token, _b, custodies_6, custody, _c, _d, market, depositCustodyConfig, transaction, backUpOracleInstruction, result, index, res;
1991
1991
  var _e;
1992
1992
  if (userPublicKey === void 0) { userPublicKey = undefined; }
1993
- if (enableBackupOracle === void 0) { enableBackupOracle = true; }
1993
+ if (enableBackupOracle === void 0) { enableBackupOracle = false; }
1994
1994
  return __generator(this, function (_f) {
1995
1995
  switch (_f.label) {
1996
1996
  case 0:
@@ -2066,7 +2066,7 @@ var PerpetualsClient = (function () {
2066
2066
  var custodies, custodyMetas, marketMetas, _a, custodies_7, token, _b, custodies_8, custody, _c, _d, market, removeCustodyConfig, transaction, backUpOracleInstruction, result, index, res;
2067
2067
  var _e;
2068
2068
  if (userPublicKey === void 0) { userPublicKey = undefined; }
2069
- if (enableBackupOracle === void 0) { enableBackupOracle = true; }
2069
+ if (enableBackupOracle === void 0) { enableBackupOracle = false; }
2070
2070
  return __generator(this, function (_f) {
2071
2071
  switch (_f.label) {
2072
2072
  case 0:
@@ -2207,7 +2207,7 @@ var PerpetualsClient = (function () {
2207
2207
  var custodies, custodyMetas, marketMetas, _a, custodies_11, token, _b, custodies_12, custody, _c, _d, market, depositCustodyConfig, rewardCustody, transaction, backUpOracleInstruction, result, index, res;
2208
2208
  var _e;
2209
2209
  if (userPublicKey === void 0) { userPublicKey = undefined; }
2210
- if (enableBackupOracle === void 0) { enableBackupOracle = true; }
2210
+ if (enableBackupOracle === void 0) { enableBackupOracle = false; }
2211
2211
  return __generator(this, function (_f) {
2212
2212
  switch (_f.label) {
2213
2213
  case 0:
@@ -2287,7 +2287,7 @@ var PerpetualsClient = (function () {
2287
2287
  var custodies, custodyMetas, marketMetas, _a, custodies_13, token, _b, custodies_14, custody, _c, _d, market, removeCustodyConfig, rewardCustody, transaction, backUpOracleInstruction, result, index, res;
2288
2288
  var _e;
2289
2289
  if (userPublicKey === void 0) { userPublicKey = undefined; }
2290
- if (enableBackupOracle === void 0) { enableBackupOracle = true; }
2290
+ if (enableBackupOracle === void 0) { enableBackupOracle = false; }
2291
2291
  return __generator(this, function (_f) {
2292
2292
  switch (_f.label) {
2293
2293
  case 0:
@@ -2623,7 +2623,7 @@ var PerpetualsClient = (function () {
2623
2623
  collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
2624
2624
  collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
2625
2625
  systemProgram: web3_js_1.SystemProgram.programId,
2626
- tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
2626
+ fundingTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
2627
2627
  eventAuthority: this.eventAuthority.publicKey,
2628
2628
  program: this.programId,
2629
2629
  transferAuthority: this.authority.publicKey,
@@ -2726,7 +2726,6 @@ var PerpetualsClient = (function () {
2726
2726
  collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
2727
2727
  collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
2728
2728
  eventAuthority: this.eventAuthority.publicKey,
2729
- tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
2730
2729
  program: this.programId,
2731
2730
  ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
2732
2731
  collateralMint: collateralCustodyConfig.mintKey,
@@ -2891,7 +2890,6 @@ var PerpetualsClient = (function () {
2891
2890
  collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
2892
2891
  collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
2893
2892
  systemProgram: web3_js_1.SystemProgram.programId,
2894
- tokenProgram: poolConfig.getTokenFromSymbol(collateralTokenSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
2895
2893
  eventAuthority: this.eventAuthority.publicKey,
2896
2894
  program: this.programId,
2897
2895
  ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
@@ -3137,7 +3135,7 @@ var PerpetualsClient = (function () {
3137
3135
  collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
3138
3136
  collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
3139
3137
  eventAuthority: this.eventAuthority.publicKey,
3140
- tokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
3138
+ fundingTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
3141
3139
  program: this.programId,
3142
3140
  ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
3143
3141
  fundingMint: collateralCustodyConfig.mintKey
@@ -3257,7 +3255,7 @@ var PerpetualsClient = (function () {
3257
3255
  collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
3258
3256
  collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
3259
3257
  eventAuthority: this.eventAuthority.publicKey,
3260
- tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
3258
+ fundingTokenProgram: poolConfig.getTokenFromSymbol(inputSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
3261
3259
  program: this.programId,
3262
3260
  ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
3263
3261
  fundingMint: collateralCustodyConfig.mintKey,
@@ -3359,7 +3357,7 @@ var PerpetualsClient = (function () {
3359
3357
  collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
3360
3358
  collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
3361
3359
  eventAuthority: this.eventAuthority.publicKey,
3362
- tokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
3360
+ receivingTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
3363
3361
  program: this.programId,
3364
3362
  ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
3365
3363
  receivingMint: collateralCustodyConfig.mintKey
@@ -3468,7 +3466,6 @@ var PerpetualsClient = (function () {
3468
3466
  dispensingCustody: outputCustodyConfig.custodyAccount,
3469
3467
  dispensingOracleAccount: this.useExtOracleAccount ? outputCustodyConfig.extOracleAccount : outputCustodyConfig.intOracleAccount,
3470
3468
  dispensingCustodyTokenAccount: outputCustodyConfig.tokenAccount,
3471
- tokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
3472
3469
  eventAuthority: this.eventAuthority.publicKey,
3473
3470
  program: this.programId,
3474
3471
  ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
@@ -3535,7 +3532,7 @@ var PerpetualsClient = (function () {
3535
3532
  collateralCustody: collateralCustodyConfig.custodyAccount,
3536
3533
  collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
3537
3534
  collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
3538
- tokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
3535
+ collateralTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
3539
3536
  eventAuthority: this.eventAuthority.publicKey,
3540
3537
  program: this.programId,
3541
3538
  ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
@@ -3600,7 +3597,7 @@ var PerpetualsClient = (function () {
3600
3597
  collateralCustody: collateralCustodyConfig.custodyAccount,
3601
3598
  collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
3602
3599
  collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
3603
- tokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
3600
+ collateralTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
3604
3601
  eventAuthority: this.eventAuthority.publicKey,
3605
3602
  program: this.programId,
3606
3603
  ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
@@ -6064,7 +6061,7 @@ var PerpetualsClient = (function () {
6064
6061
  collateralCustody: collateralCustodyConfig.custodyAccount,
6065
6062
  collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
6066
6063
  collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
6067
- tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
6064
+ tokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
6068
6065
  eventAuthority: this.eventAuthority.publicKey,
6069
6066
  program: this.programId,
6070
6067
  ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
@@ -6191,7 +6188,7 @@ var PerpetualsClient = (function () {
6191
6188
  reserveCustodyTokenAccount: reserveCustodyConfig.tokenAccount,
6192
6189
  receiveCustody: receiveCustodyConfig.custodyAccount,
6193
6190
  systemProgram: web3_js_1.SystemProgram.programId,
6194
- tokenProgram: poolConfig.getTokenFromSymbol(reserveSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
6191
+ fundingTokenProgram: poolConfig.getTokenFromSymbol(reserveSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
6195
6192
  eventAuthority: this.eventAuthority.publicKey,
6196
6193
  program: this.programId,
6197
6194
  ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
@@ -6299,7 +6296,7 @@ var PerpetualsClient = (function () {
6299
6296
  reserveOracleAccount: this.useExtOracleAccount ? reserveCustodyConfig.extOracleAccount : reserveCustodyConfig.intOracleAccount,
6300
6297
  reserveCustodyTokenAccount: reserveCustodyConfig.tokenAccount,
6301
6298
  receiveCustody: receiveCustodyConfig.custodyAccount,
6302
- tokenProgram: poolConfig.getTokenFromSymbol(reserveSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
6299
+ receivingTokenProgram: poolConfig.getTokenFromSymbol(reserveSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
6303
6300
  eventAuthority: this.eventAuthority.publicKey,
6304
6301
  program: this.programId,
6305
6302
  ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
@@ -6368,7 +6365,7 @@ var PerpetualsClient = (function () {
6368
6365
  collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
6369
6366
  collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
6370
6367
  systemProgram: web3_js_1.SystemProgram.programId,
6371
- tokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
6368
+ collateralTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
6372
6369
  eventAuthority: this.eventAuthority.publicKey,
6373
6370
  program: this.programId,
6374
6371
  ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
@@ -6441,7 +6438,7 @@ var PerpetualsClient = (function () {
6441
6438
  collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
6442
6439
  collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
6443
6440
  systemProgram: web3_js_1.SystemProgram.programId,
6444
- tokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
6441
+ collateralTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
6445
6442
  eventAuthority: this.eventAuthority.publicKey,
6446
6443
  program: this.programId,
6447
6444
  ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
@@ -6857,7 +6854,7 @@ var PerpetualsClient = (function () {
6857
6854
  collateralCustody: collateralCustodyConfig.custodyAccount,
6858
6855
  collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
6859
6856
  collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
6860
- tokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
6857
+ receivingTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
6861
6858
  eventAuthority: this.eventAuthority.publicKey,
6862
6859
  program: this.programId,
6863
6860
  ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
@@ -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";
@@ -1,4 +1,3 @@
1
- /// <reference types="bn.js" />
2
1
  import { BN } from "@coral-xyz/anchor";
3
2
  import { Mint } from "@solana/spl-token";
4
3
  import { CustodyAccount } from "./CustodyAccount";
@@ -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 { ContractOraclePrice, Position } from "./types";
@@ -1,4 +1,3 @@
1
- /// <reference types="bn.js" />
2
1
  import { TokenStake, WithdrawStakeLog } from "./types";
3
2
  import { BN } from "@coral-xyz/anchor";
4
3
  import { PublicKey } from "@solana/web3.js";
@@ -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 { TokenVault } from "./types";
@@ -1,4 +1,3 @@
1
- /// <reference types="bn.js" />
2
1
  import { BN } from "@coral-xyz/anchor";
3
2
  import { Trading, VoltageStats } from "./types";
4
3
  import { PublicKey } from "@solana/web3.js";
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ 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);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ 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);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -40,7 +40,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
40
40
  };
41
41
  var _a;
42
42
  Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.createBackupOracleInstruction = exports.getBackupOracleInstruction = exports.getPythnetOraclePrices = exports.pythPriceServiceConnection = exports.API_ENDPOINT = void 0;
43
+ exports.getBackupOracleInstruction = exports.getPythnetOraclePrices = exports.pythPriceServiceConnection = exports.API_ENDPOINT = void 0;
44
+ exports.createBackupOracleInstruction = createBackupOracleInstruction;
44
45
  var price_service_client_1 = require("@pythnetwork/price-service-client");
45
46
  var web3_js_1 = require("@solana/web3.js");
46
47
  var bn_js_1 = __importDefault(require("bn.js"));
@@ -156,4 +157,3 @@ function createBackupOracleInstruction(poolAddress_1) {
156
157
  });
157
158
  });
158
159
  }
159
- exports.createBackupOracleInstruction = createBackupOracleInstruction;
@@ -1,4 +1,3 @@
1
- /// <reference types="bn.js" />
2
1
  import { PublicKey } from '@solana/web3.js';
3
2
  export declare const PERCENTAGE_DECIMALS = 4;
4
3
  export declare const USD_DECIMALS = 6;
@@ -2032,7 +2032,7 @@ export type Perpetuals = {
2032
2032
  "isSigner": false;
2033
2033
  },
2034
2034
  {
2035
- "name": "tokenProgram";
2035
+ "name": "fundingTokenProgram";
2036
2036
  "isMut": false;
2037
2037
  "isSigner": false;
2038
2038
  },
@@ -2155,7 +2155,7 @@ export type Perpetuals = {
2155
2155
  "isSigner": false;
2156
2156
  },
2157
2157
  {
2158
- "name": "tokenProgram";
2158
+ "name": "fundingTokenProgram";
2159
2159
  "isMut": false;
2160
2160
  "isSigner": false;
2161
2161
  },
@@ -2179,11 +2179,6 @@ export type Perpetuals = {
2179
2179
  "isMut": false;
2180
2180
  "isSigner": false;
2181
2181
  },
2182
- {
2183
- "name": "fundingTokenProgram";
2184
- "isMut": false;
2185
- "isSigner": false;
2186
- },
2187
2182
  {
2188
2183
  "name": "collateralMint";
2189
2184
  "isMut": false;
@@ -2293,27 +2288,27 @@ export type Perpetuals = {
2293
2288
  "isSigner": false;
2294
2289
  },
2295
2290
  {
2296
- "name": "eventAuthority";
2291
+ "name": "receivingTokenProgram";
2297
2292
  "isMut": false;
2298
2293
  "isSigner": false;
2299
2294
  },
2300
2295
  {
2301
- "name": "program";
2296
+ "name": "eventAuthority";
2302
2297
  "isMut": false;
2303
2298
  "isSigner": false;
2304
2299
  },
2305
2300
  {
2306
- "name": "ixSysvar";
2301
+ "name": "program";
2307
2302
  "isMut": false;
2308
2303
  "isSigner": false;
2309
2304
  },
2310
2305
  {
2311
- "name": "receivingMint";
2306
+ "name": "ixSysvar";
2312
2307
  "isMut": false;
2313
2308
  "isSigner": false;
2314
2309
  },
2315
2310
  {
2316
- "name": "receivingTokenProgram";
2311
+ "name": "receivingMint";
2317
2312
  "isMut": false;
2318
2313
  "isSigner": false;
2319
2314
  },
@@ -4207,7 +4202,7 @@ export type Perpetuals = {
4207
4202
  "isSigner": false;
4208
4203
  },
4209
4204
  {
4210
- "name": "tokenProgram";
4205
+ "name": "fundingTokenProgram";
4211
4206
  "isMut": false;
4212
4207
  "isSigner": false;
4213
4208
  },
@@ -4373,7 +4368,7 @@ export type Perpetuals = {
4373
4368
  "isSigner": false;
4374
4369
  },
4375
4370
  {
4376
- "name": "tokenProgram";
4371
+ "name": "fundingTokenProgram";
4377
4372
  "isMut": false;
4378
4373
  "isSigner": false;
4379
4374
  },
@@ -4496,7 +4491,7 @@ export type Perpetuals = {
4496
4491
  "isSigner": false;
4497
4492
  },
4498
4493
  {
4499
- "name": "tokenProgram";
4494
+ "name": "receivingTokenProgram";
4500
4495
  "isMut": false;
4501
4496
  "isSigner": false;
4502
4497
  },
@@ -4520,11 +4515,6 @@ export type Perpetuals = {
4520
4515
  "isMut": false;
4521
4516
  "isSigner": false;
4522
4517
  },
4523
- {
4524
- "name": "receivingTokenProgram";
4525
- "isMut": false;
4526
- "isSigner": false;
4527
- },
4528
4518
  {
4529
4519
  "name": "collateralMint";
4530
4520
  "isMut": false;
@@ -4609,7 +4599,7 @@ export type Perpetuals = {
4609
4599
  "isSigner": false;
4610
4600
  },
4611
4601
  {
4612
- "name": "tokenProgram";
4602
+ "name": "receivingTokenProgram";
4613
4603
  "isMut": false;
4614
4604
  "isSigner": false;
4615
4605
  },
@@ -4703,7 +4693,7 @@ export type Perpetuals = {
4703
4693
  "isSigner": false;
4704
4694
  },
4705
4695
  {
4706
- "name": "tokenProgram";
4696
+ "name": "collateralTokenProgram";
4707
4697
  "isMut": false;
4708
4698
  "isSigner": false;
4709
4699
  },
@@ -4796,7 +4786,7 @@ export type Perpetuals = {
4796
4786
  "isSigner": false;
4797
4787
  },
4798
4788
  {
4799
- "name": "tokenProgram";
4789
+ "name": "collateralTokenProgram";
4800
4790
  "isMut": false;
4801
4791
  "isSigner": false;
4802
4792
  },
@@ -4996,7 +4986,7 @@ export type Perpetuals = {
4996
4986
  "isSigner": false;
4997
4987
  },
4998
4988
  {
4999
- "name": "tokenProgram";
4989
+ "name": "collateralTokenProgram";
5000
4990
  "isMut": false;
5001
4991
  "isSigner": false;
5002
4992
  },
@@ -5019,11 +5009,6 @@ export type Perpetuals = {
5019
5009
  "name": "collateralMint";
5020
5010
  "isMut": false;
5021
5011
  "isSigner": false;
5022
- },
5023
- {
5024
- "name": "collateralTokenProgram";
5025
- "isMut": false;
5026
- "isSigner": false;
5027
5012
  }
5028
5013
  ];
5029
5014
  "args": [
@@ -5219,7 +5204,7 @@ export type Perpetuals = {
5219
5204
  "isSigner": false;
5220
5205
  },
5221
5206
  {
5222
- "name": "tokenProgram";
5207
+ "name": "collateralTokenProgram";
5223
5208
  "isMut": false;
5224
5209
  "isSigner": false;
5225
5210
  },
@@ -5327,7 +5312,7 @@ export type Perpetuals = {
5327
5312
  "isSigner": false;
5328
5313
  },
5329
5314
  {
5330
- "name": "tokenProgram";
5315
+ "name": "collateralTokenProgram";
5331
5316
  "isMut": false;
5332
5317
  "isSigner": false;
5333
5318
  },
@@ -5440,7 +5425,7 @@ export type Perpetuals = {
5440
5425
  "isSigner": false;
5441
5426
  },
5442
5427
  {
5443
- "name": "tokenProgram";
5428
+ "name": "fundingTokenProgram";
5444
5429
  "isMut": false;
5445
5430
  "isSigner": false;
5446
5431
  },
@@ -5553,7 +5538,7 @@ export type Perpetuals = {
5553
5538
  "isSigner": false;
5554
5539
  },
5555
5540
  {
5556
- "name": "tokenProgram";
5541
+ "name": "receivingTokenProgram";
5557
5542
  "isMut": false;
5558
5543
  "isSigner": false;
5559
5544
  },
@@ -5975,7 +5960,7 @@ export type Perpetuals = {
5975
5960
  "isSigner": false;
5976
5961
  },
5977
5962
  {
5978
- "name": "tokenProgram";
5963
+ "name": "receivingTokenProgram";
5979
5964
  "isMut": false;
5980
5965
  "isSigner": false;
5981
5966
  },