flash-sdk 11.11.4 → 11.11.5-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.d.ts +2 -2
- package/dist/OraclePrice.d.ts +0 -1
- package/dist/OrderAccount.d.ts +0 -1
- package/dist/PerpetualsClient.d.ts +245 -4396
- package/dist/PerpetualsClient.js +107 -187
- package/dist/PoolAccount.d.ts +0 -1
- package/dist/PoolConfig.json +6 -6
- package/dist/PoolDataClient.d.ts +0 -1
- package/dist/PositionAccount.d.ts +0 -1
- package/dist/TokenStakeAccount.d.ts +0 -1
- package/dist/TokenVaultAccount.d.ts +0 -1
- package/dist/ViewHelper.js +8 -5
- package/dist/backupOracle.js +4 -4
- package/dist/constants/index.d.ts +0 -1
- package/dist/idl/perpetuals.d.ts +26232 -13443
- package/dist/idl/perpetuals.js +0 -18151
- package/dist/idl/perpetuals.json +30940 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/generated.d.ts +2272 -0
- package/dist/types/generated.js +2 -0
- package/dist/types/index.d.ts +46 -157
- package/dist/types/index.js +35 -20
- package/dist/utils/IdlCoder.d.ts +3 -2
- package/dist/utils/IdlCoder.js +21 -9
- package/dist/utils/alt.js +5 -6
- package/dist/utils/anchorCpiEvents.d.ts +1 -2
- package/dist/utils/anchorCpiEvents.js +14 -10
- package/dist/utils/index.js +6 -6
- package/dist/utils/rpc.js +9 -9
- package/package.json +3 -2
package/dist/PoolAccount.d.ts
CHANGED
package/dist/PoolConfig.json
CHANGED
|
@@ -393,9 +393,9 @@
|
|
|
393
393
|
"targetCustody": "91yLwvTsWLyQ59hPKvXgKRLiTEWh9ZZnFqWPNbWGYxcf",
|
|
394
394
|
"collateralCustody": "91yLwvTsWLyQ59hPKvXgKRLiTEWh9ZZnFqWPNbWGYxcf",
|
|
395
395
|
"side": "long",
|
|
396
|
-
"maxLev":
|
|
397
|
-
"degenMinLev":
|
|
398
|
-
"degenMaxLev":
|
|
396
|
+
"maxLev": 50,
|
|
397
|
+
"degenMinLev": 50,
|
|
398
|
+
"degenMaxLev": 50,
|
|
399
399
|
"targetCustodyId": 5,
|
|
400
400
|
"collateralCustodyId": 5,
|
|
401
401
|
"targetMint": "A7bdiYdS5GjqGFtxf17ppRHtDKPkkRqbKtR27dxvQXaS",
|
|
@@ -409,9 +409,9 @@
|
|
|
409
409
|
"targetCustody": "91yLwvTsWLyQ59hPKvXgKRLiTEWh9ZZnFqWPNbWGYxcf",
|
|
410
410
|
"collateralCustody": "5N2St2e1BdgWsJiXxfetwWKkHS1BYochAp1ruPFJUfgY",
|
|
411
411
|
"side": "short",
|
|
412
|
-
"maxLev":
|
|
413
|
-
"degenMinLev":
|
|
414
|
-
"degenMaxLev":
|
|
412
|
+
"maxLev": 50,
|
|
413
|
+
"degenMinLev": 50,
|
|
414
|
+
"degenMaxLev": 50,
|
|
415
415
|
"targetCustodyId": 5,
|
|
416
416
|
"collateralCustodyId": 0,
|
|
417
417
|
"targetMint": "A7bdiYdS5GjqGFtxf17ppRHtDKPkkRqbKtR27dxvQXaS",
|
package/dist/PoolDataClient.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.");
|
|
@@ -44,11 +44,14 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
44
44
|
}
|
|
45
45
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
46
46
|
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
47
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
51
|
exports.ViewHelper = void 0;
|
|
49
52
|
var web3_js_1 = require("@solana/web3.js");
|
|
50
53
|
var base64_1 = require("@coral-xyz/anchor/dist/cjs/utils/bytes/base64");
|
|
51
|
-
var
|
|
54
|
+
var perpetuals_json_1 = __importDefault(require("./idl/perpetuals.json"));
|
|
52
55
|
var IdlCoder_1 = require("./utils/IdlCoder");
|
|
53
56
|
var ViewHelper = (function () {
|
|
54
57
|
function ViewHelper(client) {
|
|
@@ -65,11 +68,11 @@ var ViewHelper = (function () {
|
|
|
65
68
|
throw new Error('View expected return log');
|
|
66
69
|
}
|
|
67
70
|
var returnData = (0, base64_1.decode)(returnLog.slice(returnPrefix_1.length));
|
|
68
|
-
var returnType =
|
|
71
|
+
var returnType = perpetuals_json_1.default.instructions[instructionNumber].returns;
|
|
69
72
|
if (!returnType) {
|
|
70
73
|
throw new Error('View expected return type');
|
|
71
74
|
}
|
|
72
|
-
var coder = IdlCoder_1.IdlCoder.fieldLayout({ type: returnType }, Array.from(__spreadArray(__spreadArray([], ((_a =
|
|
75
|
+
var coder = IdlCoder_1.IdlCoder.fieldLayout({ type: returnType }, Array.from(__spreadArray(__spreadArray([], ((_a = perpetuals_json_1.default.accounts) !== null && _a !== void 0 ? _a : []), true), ((_b = perpetuals_json_1.default.types) !== null && _b !== void 0 ? _b : []), true)));
|
|
73
76
|
return coder.decode(returnData);
|
|
74
77
|
}
|
|
75
78
|
else {
|
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 = 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;
|