flash-sdk 3.2.1-alpha.1 → 4.0.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.
@@ -12,7 +12,6 @@ var __assign = (this && this.__assign) || function () {
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.PositionAccount = void 0;
15
- var anchor_1 = require("@coral-xyz/anchor");
16
15
  var PositionAccount = (function () {
17
16
  function PositionAccount(publicKey, parseData) {
18
17
  this.publicKey = publicKey;
@@ -27,9 +26,6 @@ var PositionAccount = (function () {
27
26
  PositionAccount.prototype.updatePositionData = function (position) {
28
27
  Object.assign(this, __assign({}, position));
29
28
  };
30
- PositionAccount.prototype.isDegenMode = function () {
31
- return this.degenSizeUsd.gt(new anchor_1.BN(0));
32
- };
33
29
  return PositionAccount;
34
30
  }());
35
31
  exports.PositionAccount = PositionAccount;
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { TokenStake, WithdrawStakeLog } from "./types";
2
3
  import { BN } from "@coral-xyz/anchor";
3
4
  import { PublicKey } from "@solana/web3.js";
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { BN } from "@coral-xyz/anchor";
2
3
  import { PublicKey } from "@solana/web3.js";
3
4
  import { TokenVault } from "./types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { BN } from "@coral-xyz/anchor";
2
3
  import { Trading, VoltageStats } from "./types";
3
4
  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 = 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;
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;
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 = 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;
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;
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,8 +40,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
40
40
  };
41
41
  var _a;
42
42
  Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.getBackupOracleInstruction = exports.getPythnetOraclePrices = exports.pythPriceServiceConnection = exports.API_ENDPOINT = void 0;
44
- exports.createBackupOracleInstruction = createBackupOracleInstruction;
43
+ exports.createBackupOracleInstruction = exports.getBackupOracleInstruction = exports.getPythnetOraclePrices = exports.pythPriceServiceConnection = exports.API_ENDPOINT = void 0;
45
44
  var price_service_client_1 = require("@pythnetwork/price-service-client");
46
45
  var web3_js_1 = require("@solana/web3.js");
47
46
  var bn_js_1 = __importDefault(require("bn.js"));
@@ -157,3 +156,4 @@ function createBackupOracleInstruction(poolAddress_1) {
157
156
  });
158
157
  });
159
158
  }
159
+ exports.createBackupOracleInstruction = createBackupOracleInstruction;
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { PublicKey } from '@solana/web3.js';
2
3
  export declare const PERCENTAGE_DECIMALS = 4;
3
4
  export declare const USD_DECIMALS = 6;