flash-sdk 2.46.6 → 2.46.8
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/OraclePrice.d.ts +1 -0
- package/dist/OrderAccount.d.ts +1 -0
- package/dist/PerpetualsClient.d.ts +11 -9
- package/dist/PerpetualsClient.js +380 -341
- package/dist/PoolAccount.d.ts +1 -0
- package/dist/PoolConfig.json +0 -122
- package/dist/PoolDataClient.d.ts +1 -0
- package/dist/PositionAccount.d.ts +1 -0
- package/dist/TokenVaultAccount.d.ts +1 -0
- package/dist/TradingAccount.d.ts +1 -0
- package/dist/ViewHelper.d.ts +2 -2
- package/dist/ViewHelper.js +6 -5
- package/dist/backupOracle.js +4 -4
- package/dist/constants/index.d.ts +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +3 -3
- 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/index.js +6 -6
- package/dist/utils/rpc.js +9 -9
- package/package.json +1 -1
package/dist/PoolAccount.d.ts
CHANGED
package/dist/PoolConfig.json
CHANGED
@@ -1627,128 +1627,6 @@
|
|
1627
1627
|
}
|
1628
1628
|
]
|
1629
1629
|
},
|
1630
|
-
{
|
1631
|
-
"programId": "FLASH6Lo6h3iasJKWDs2F8TkW2UKf3s15C8PMGuVfgBn",
|
1632
|
-
"perpComposibilityProgramId": "FSWAPViR8ny5K96hezav8jynVubP2dJ2L7SbKzds2hwm",
|
1633
|
-
"fbNftRewardProgramId": "FBRWDXSLysNbFQk64MQJcpkXP8e4fjezsGabV8jV7d7o",
|
1634
|
-
"cluster": "mainnet-beta",
|
1635
|
-
"poolName": "Test.2",
|
1636
|
-
"poolAddress": "HAMrKdJu6UKaELV7hRy9d2ZQaaT4YHmdbac9HQGcSs4p",
|
1637
|
-
"stakedLpTokenMint": "ByTQ9ppwD2DgPSjsAB8t7n2BtGKHU98vyCByAAcpmaJM",
|
1638
|
-
"compoundingTokenMint": "6w6Kx49cTb9oCZyPpqCFLMEr9CatsEDJBfsMkGZqnEaH",
|
1639
|
-
"stakedLpVault": "DPLMya2ap8dcxCBbBEsxwakPUHQckjLaby6JwnZ99T95",
|
1640
|
-
"compoundingLpVault": "54FMNZG5YBbCv5bCATqXXZemt7o1bjfK1a2qXkV6zhDr",
|
1641
|
-
"metadataAccount": "F5c5aokEimuxvFUU7RwzjB2g9g95wgUqMtFdRdyti1oi",
|
1642
|
-
"lpDecimals": 6,
|
1643
|
-
"compoundingLpTokenSymbol": "FLP.7",
|
1644
|
-
"stakedLpTokenSymbol": "sFLP.7",
|
1645
|
-
"perpetuals": "7DWCtB5Z8rPiyBMKUwqyC95R9tJpbhoQhLM9LbK3Z5QZ",
|
1646
|
-
"transferAuthority": "81xGAvJ27ZeRThU2JEfKAUeT4Fx6qCCd8WHZpujZbiiG",
|
1647
|
-
"tokenMint": "FAFxVxnkzZHMCodkWyoccgUNgVScqMw2mhhQBYDFjFAF",
|
1648
|
-
"tokenVault": "DBh5a25KUsmbz62sxStp4PRu8WdJmdGUmuCJWvxse5YL",
|
1649
|
-
"tokenVaultTokenAccount": "7tULeZXC2UyPPzHyE9BhFJmFtfNedACJrVywyWYSwzJP",
|
1650
|
-
"multisig": "3FqKnAQrvr6G6AqCAWKdqg9fVe6ceAk3A5Y1ibeQqV2V",
|
1651
|
-
"addressLookupTableAddresses": [
|
1652
|
-
"AUebVLw8UwN35Us2XcPQaTQejJoQ5T7ckWzxHTwN1mkM"
|
1653
|
-
],
|
1654
|
-
"backupOracle": "AjAubETeBLhebBxLcErmzbavZfqF9bCxkpRAdyJtoi9G",
|
1655
|
-
"nftCollectionAddress": "H4EQ8pcE7PQSQGG1WYW4hAA1nizU6ULYipHZcYk9b64u",
|
1656
|
-
"rewardDistributionProgram": {
|
1657
|
-
"programId": "FARNT7LL119pmy9vSkN9q1ApZESPaKHuuX5Acz1oBoME",
|
1658
|
-
"transferAuthority": "E2GZM2FQmX2uGBcBpLQB3s5UhPJvM2F8BgHEkBG45xBN",
|
1659
|
-
"rewardVault": "6sXyDryKp6hqV6E1jc7gbzTeWxTFUW1A6s39vzp55hLL",
|
1660
|
-
"rewardMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
1661
|
-
"rewardTokenAccount": "EhH4KEra2UfKdwRErjEFf2286BQ3BstKxfLiyYnF513h"
|
1662
|
-
},
|
1663
|
-
"tokens": [
|
1664
|
-
{
|
1665
|
-
"symbol": "USDC",
|
1666
|
-
"mintKey": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
1667
|
-
"decimals": 6,
|
1668
|
-
"usdPrecision": 2,
|
1669
|
-
"tokenPrecision": 4,
|
1670
|
-
"isStable": true,
|
1671
|
-
"isVirtual": false,
|
1672
|
-
"pythTicker": "Crypto.USDC/USD",
|
1673
|
-
"pythPriceId": "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a"
|
1674
|
-
},
|
1675
|
-
{
|
1676
|
-
"symbol": "TNSR",
|
1677
|
-
"mintKey": "TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6",
|
1678
|
-
"decimals": 9,
|
1679
|
-
"usdPrecision": 4,
|
1680
|
-
"tokenPrecision": 4,
|
1681
|
-
"isStable": false,
|
1682
|
-
"isVirtual": false,
|
1683
|
-
"pythTicker": "Crypto.TNSR/USD",
|
1684
|
-
"pythPriceId": "05ecd4597cd48fe13d6cc3596c62af4f9675aee06e2e0b94c06d8bee2b659e05"
|
1685
|
-
}
|
1686
|
-
],
|
1687
|
-
"custodies": [
|
1688
|
-
{
|
1689
|
-
"custodyId": 0,
|
1690
|
-
"custodyAccount": "AaA92Zfjz3qDa2WQdqRZ7apdnvNDK5iaXuEoNYckgYE5",
|
1691
|
-
"tokenAccount": "BNewNn9RfZA7bNtpsmLUu4x58VpVjny9NqUqVietRGf8",
|
1692
|
-
"symbol": "USDC",
|
1693
|
-
"mintKey": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
1694
|
-
"decimals": 6,
|
1695
|
-
"usdPrecision": 2,
|
1696
|
-
"tokenPrecision": 2,
|
1697
|
-
"isStable": true,
|
1698
|
-
"isVirtual": false,
|
1699
|
-
"intOracleAddress": "GCtJxWQ57B3BJUYdWrhb3TUxzeiDUx275ZCxKkTV6G3N",
|
1700
|
-
"extOracleAddress": "Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX",
|
1701
|
-
"pythTicker": "Crypto.USDC/USD",
|
1702
|
-
"pythPriceId": "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a"
|
1703
|
-
},
|
1704
|
-
{
|
1705
|
-
"custodyId": 1,
|
1706
|
-
"custodyAccount": "12UF24xdtkb2xuGA5qK74jE52JzeB29y1J3zKXsGRHNJ",
|
1707
|
-
"tokenAccount": "4vaGYK2gNupRTYyNjUxbTxARyVW9hmHC19iRVkTtxRfX",
|
1708
|
-
"symbol": "TNSR",
|
1709
|
-
"mintKey": "TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6",
|
1710
|
-
"decimals": 9,
|
1711
|
-
"usdPrecision": 4,
|
1712
|
-
"tokenPrecision": 4,
|
1713
|
-
"isStable": false,
|
1714
|
-
"isVirtual": false,
|
1715
|
-
"intOracleAddress": "AH1f6CwHweibN4qybx7eu7AS1jUD2WtAG4ZXkndZKMyg",
|
1716
|
-
"extOracleAddress": "9TSGDwcPQX4JpAvZbu2Wp5b68wSYkQvHCvfeBjYcCyC",
|
1717
|
-
"pythTicker": "Crypto.TNSR/USD",
|
1718
|
-
"pythPriceId": "05ecd4597cd48fe13d6cc3596c62af4f9675aee06e2e0b94c06d8bee2b659e05"
|
1719
|
-
}
|
1720
|
-
],
|
1721
|
-
"markets": [
|
1722
|
-
{
|
1723
|
-
"marketId": 0,
|
1724
|
-
"marketAccount": "VUP8ywiDqH5ZbEmUCmwrmUCNuETwbxSksono1BVj2jN",
|
1725
|
-
"marketCorrelation": true,
|
1726
|
-
"pool": "HAMrKdJu6UKaELV7hRy9d2ZQaaT4YHmdbac9HQGcSs4p",
|
1727
|
-
"targetCustody": "12UF24xdtkb2xuGA5qK74jE52JzeB29y1J3zKXsGRHNJ",
|
1728
|
-
"collateralCustody": "12UF24xdtkb2xuGA5qK74jE52JzeB29y1J3zKXsGRHNJ",
|
1729
|
-
"side": "long",
|
1730
|
-
"maxLev": 10,
|
1731
|
-
"targetCustodyId": 1,
|
1732
|
-
"collateralCustodyId": 1,
|
1733
|
-
"targetMint": "TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6",
|
1734
|
-
"collateralMint": "TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6"
|
1735
|
-
},
|
1736
|
-
{
|
1737
|
-
"marketId": 1,
|
1738
|
-
"marketAccount": "91ki4mEELMuEpweTMdSAuiykj3wTCsogEtVQsetRDnwQ",
|
1739
|
-
"marketCorrelation": false,
|
1740
|
-
"pool": "HAMrKdJu6UKaELV7hRy9d2ZQaaT4YHmdbac9HQGcSs4p",
|
1741
|
-
"targetCustody": "12UF24xdtkb2xuGA5qK74jE52JzeB29y1J3zKXsGRHNJ",
|
1742
|
-
"collateralCustody": "AaA92Zfjz3qDa2WQdqRZ7apdnvNDK5iaXuEoNYckgYE5",
|
1743
|
-
"side": "short",
|
1744
|
-
"maxLev": 10,
|
1745
|
-
"targetCustodyId": 1,
|
1746
|
-
"collateralCustodyId": 0,
|
1747
|
-
"targetMint": "TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6",
|
1748
|
-
"collateralMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
|
1749
|
-
}
|
1750
|
-
]
|
1751
|
-
},
|
1752
1630
|
{
|
1753
1631
|
"programId": "FTN6rgbaaxwT8mpRuC55EFTwpHB3BwnHJ91Lqv4ZVCfW",
|
1754
1632
|
"perpComposibilityProgramId": "SWAP4AE4N1if9qKD7dgfQgmRBRv1CtWG8xDs4HP14ST",
|
package/dist/PoolDataClient.d.ts
CHANGED
package/dist/TradingAccount.d.ts
CHANGED
package/dist/ViewHelper.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { RpcResponseAndContext, SimulatedTransactionResponse, Transaction } from "@solana/web3.js";
|
1
|
+
import { PublicKey, RpcResponseAndContext, SimulatedTransactionResponse, Transaction } from "@solana/web3.js";
|
2
2
|
import { PerpetualsClient } from "./PerpetualsClient";
|
3
3
|
export declare class ViewHelper {
|
4
4
|
private perpetualsClient;
|
5
5
|
constructor(client: PerpetualsClient);
|
6
6
|
decodeLogs<T>(data: RpcResponseAndContext<SimulatedTransactionResponse>, instructionNumber: number, instructionName?: string): T | undefined;
|
7
|
-
simulateTransaction(transaction: Transaction): Promise<RpcResponseAndContext<SimulatedTransactionResponse>>;
|
7
|
+
simulateTransaction(transaction: Transaction, userPublicKey?: PublicKey | undefined): Promise<RpcResponseAndContext<SimulatedTransactionResponse>>;
|
8
8
|
}
|
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.");
|
@@ -82,13 +82,14 @@ var ViewHelper = (function () {
|
|
82
82
|
console.log("decode error::", error);
|
83
83
|
}
|
84
84
|
};
|
85
|
-
ViewHelper.prototype.simulateTransaction = function (
|
86
|
-
return __awaiter(this,
|
85
|
+
ViewHelper.prototype.simulateTransaction = function (transaction_1) {
|
86
|
+
return __awaiter(this, arguments, void 0, function (transaction, userPublicKey) {
|
87
87
|
var latestBlockhash, messageV0, transaction2;
|
88
|
+
if (userPublicKey === void 0) { userPublicKey = undefined; }
|
88
89
|
return __generator(this, function (_a) {
|
89
90
|
switch (_a.label) {
|
90
91
|
case 0:
|
91
|
-
transaction.feePayer = this.perpetualsClient.provider.publicKey;
|
92
|
+
transaction.feePayer = userPublicKey !== null && userPublicKey !== void 0 ? userPublicKey : this.perpetualsClient.provider.publicKey;
|
92
93
|
return [4, this.perpetualsClient.provider.connection.getLatestBlockhash('confirmed')];
|
93
94
|
case 1:
|
94
95
|
latestBlockhash = _a.sent();
|
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;
|