flash-sdk 5.0.2 → 6.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.
- package/dist/MarketAccount.d.ts +1 -1
- package/dist/OraclePrice.d.ts +0 -1
- package/dist/OrderAccount.d.ts +0 -1
- package/dist/PerpetualsClient.d.ts +205 -221
- package/dist/PerpetualsClient.js +191 -348
- package/dist/PoolAccount.d.ts +0 -1
- package/dist/PoolConfig.d.ts +2 -0
- package/dist/PoolConfig.js +1 -1
- package/dist/PoolConfig.json +167 -11
- package/dist/PoolDataClient.d.ts +0 -1
- package/dist/PositionAccount.d.ts +4 -3
- package/dist/PositionAccount.js +3 -0
- package/dist/TokenStakeAccount.d.ts +0 -1
- package/dist/TokenVaultAccount.d.ts +0 -1
- package/dist/TradingAccount.d.ts +0 -1
- package/dist/ViewHelper.js +2 -2
- package/dist/backupOracle.js +4 -4
- package/dist/constants/index.d.ts +0 -1
- package/dist/idl/perpetuals.d.ts +66 -541
- package/dist/idl/perpetuals.js +66 -541
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +0 -4
- package/dist/types/index.js +7 -6
- 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/index.js +6 -6
- package/dist/utils/rpc.js +9 -9
- package/package.json +1 -1
package/dist/PoolDataClient.d.ts
CHANGED
@@ -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";
|
@@ -19,14 +18,16 @@ export declare class PositionAccount implements Position {
|
|
19
18
|
unsettledAmount: BN;
|
20
19
|
unsettledFeesUsd: BN;
|
21
20
|
cumulativeLockFeeSnapshot: BN;
|
22
|
-
|
23
|
-
|
21
|
+
degenSizeUsd: BN;
|
22
|
+
buffer: BN;
|
24
23
|
sizeDecimals: number;
|
25
24
|
lockedDecimals: number;
|
26
25
|
collateralDecimals: number;
|
27
26
|
bump: number;
|
27
|
+
padding: number[];
|
28
28
|
constructor(publicKey: PublicKey, parseData: Position);
|
29
29
|
static from(publicKey: PublicKey, parseData: Position): PositionAccount;
|
30
30
|
clone(): PositionAccount;
|
31
31
|
updatePositionData(position: Position): void;
|
32
|
+
isDegenMode(): boolean;
|
32
33
|
}
|
package/dist/PositionAccount.js
CHANGED
@@ -26,6 +26,9 @@ var PositionAccount = (function () {
|
|
26
26
|
PositionAccount.prototype.updatePositionData = function (position) {
|
27
27
|
Object.assign(this, __assign({}, position));
|
28
28
|
};
|
29
|
+
PositionAccount.prototype.isDegenMode = function () {
|
30
|
+
return this.degenSizeUsd.gte(this.sizeUsd);
|
31
|
+
};
|
29
32
|
return PositionAccount;
|
30
33
|
}());
|
31
34
|
exports.PositionAccount = PositionAccount;
|
package/dist/TradingAccount.d.ts
CHANGED
package/dist/ViewHelper.js
CHANGED
@@ -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 =
|
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.");
|
package/dist/backupOracle.js
CHANGED
@@ -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 =
|
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.
|
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;
|