flash-sdk 9.0.1 → 9.0.2-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.js +1 -1
- package/dist/OraclePrice.d.ts +1 -0
- package/dist/OrderAccount.d.ts +1 -0
- package/dist/PerpetualsClient.d.ts +297 -140
- package/dist/PerpetualsClient.js +641 -1030
- package/dist/PoolAccount.d.ts +4 -0
- package/dist/PoolConfig.d.ts +3 -1
- package/dist/PoolConfig.js +4 -2
- package/dist/PoolConfig.json +132 -3246
- package/dist/PoolDataClient.d.ts +1 -0
- package/dist/PositionAccount.d.ts +4 -2
- package/dist/TokenStakeAccount.d.ts +3 -2
- package/dist/TokenStakeAccount.js +2 -2
- package/dist/TokenVaultAccount.d.ts +1 -0
- package/dist/ViewHelper.js +2 -2
- package/dist/backupOracle.js +4 -4
- package/dist/constants/index.d.ts +1 -0
- package/dist/idl/perpetuals.d.ts +3038 -1715
- package/dist/idl/perpetuals.js +3038 -1715
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/testSize.d.ts +0 -0
- package/dist/testSize.js +0 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +18 -3
- package/dist/types/index.js +6 -5
- package/dist/utils/IdlCoder.js +7 -17
- package/dist/utils/alt.js +6 -5
- package/dist/utils/anchorCpiEvents.d.ts +1 -0
- package/dist/utils/anchorCpiEvents.js +4 -4
- package/dist/utils/getReferralAccounts.d.ts +1 -1
- package/dist/utils/getReferralAccounts.js +3 -8
- package/dist/utils/index.js +6 -6
- package/dist/utils/rpc.js +9 -9
- package/package.json +1 -1
- package/dist/TradingAccount.d.ts +0 -23
- package/dist/TradingAccount.js +0 -17
package/dist/PoolDataClient.d.ts
CHANGED
|
@@ -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 { ContractOraclePrice, Position } from "./types";
|
|
@@ -15,11 +16,12 @@ export declare class PositionAccount implements Position {
|
|
|
15
16
|
lockedUsd: BN;
|
|
16
17
|
collateralAmount: BN;
|
|
17
18
|
collateralUsd: BN;
|
|
18
|
-
|
|
19
|
+
unsettledValueUsd: BN;
|
|
19
20
|
unsettledFeesUsd: BN;
|
|
20
21
|
cumulativeLockFeeSnapshot: BN;
|
|
21
22
|
degenSizeUsd: BN;
|
|
22
|
-
|
|
23
|
+
referencePrice: ContractOraclePrice;
|
|
24
|
+
buffer: number;
|
|
23
25
|
sizeDecimals: number;
|
|
24
26
|
lockedDecimals: number;
|
|
25
27
|
collateralDecimals: number;
|
|
@@ -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";
|
|
@@ -16,7 +17,7 @@ export declare class TokenStakeAccount implements TokenStake {
|
|
|
16
17
|
rewardTokens: BN;
|
|
17
18
|
unclaimedRevenueAmount: BN;
|
|
18
19
|
revenueSnapshot: BN;
|
|
19
|
-
|
|
20
|
+
claimableRebateUsd: BN;
|
|
20
21
|
constructor(data: {
|
|
21
22
|
owner: PublicKey;
|
|
22
23
|
isInitialized: boolean;
|
|
@@ -32,7 +33,7 @@ export declare class TokenStakeAccount implements TokenStake {
|
|
|
32
33
|
rewardTokens: BN;
|
|
33
34
|
unclaimedRevenueAmount: BN;
|
|
34
35
|
revenueSnapshot: BN;
|
|
35
|
-
|
|
36
|
+
claimableRebateUsd: BN;
|
|
36
37
|
});
|
|
37
38
|
static from(decodedData: any): TokenStakeAccount;
|
|
38
39
|
updateData(newData: Partial<TokenStakeAccount>): void;
|
|
@@ -18,7 +18,7 @@ var TokenStakeAccount = (function () {
|
|
|
18
18
|
this.lastRewardEpochCount = data.lastRewardEpochCount;
|
|
19
19
|
this.unclaimedRevenueAmount = data.unclaimedRevenueAmount;
|
|
20
20
|
this.revenueSnapshot = data.revenueSnapshot;
|
|
21
|
-
this.
|
|
21
|
+
this.claimableRebateUsd = data.claimableRebateUsd;
|
|
22
22
|
}
|
|
23
23
|
TokenStakeAccount.from = function (decodedData) {
|
|
24
24
|
return new TokenStakeAccount({
|
|
@@ -36,7 +36,7 @@ var TokenStakeAccount = (function () {
|
|
|
36
36
|
lastRewardEpochCount: decodedData.lastRewardEpochCount,
|
|
37
37
|
unclaimedRevenueAmount: decodedData.unclaimedRevenueAmount,
|
|
38
38
|
revenueSnapshot: decodedData.revenueSnapshot,
|
|
39
|
-
|
|
39
|
+
claimableRebateUsd: decodedData.claimableRebateUsd,
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
42
|
TokenStakeAccount.prototype.updateData = function (newData) {
|
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;
|
|
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.");
|
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;
|
|
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;
|