flash-sdk 1.0.29 → 1.0.31
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/PerpetualsClient.d.ts +619 -218
- package/dist/PerpetualsClient.js +107 -238
- package/dist/PoolConfig.d.ts +2 -1
- package/dist/PoolConfig.js +10 -3
- package/dist/PoolConfig.json +6 -0
- package/dist/idl/perpetuals.d.ts +666 -262
- package/dist/idl/perpetuals.js +668 -264
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/rpc.d.ts +17 -2
- package/dist/utils/rpc.js +43 -3
- package/package.json +1 -1
package/dist/PoolConfig.js
CHANGED
@@ -18,7 +18,7 @@ exports.PoolConfig = void 0;
|
|
18
18
|
var web3_js_1 = require("@solana/web3.js");
|
19
19
|
var PoolConfig_json_1 = __importDefault(require("./PoolConfig.json"));
|
20
20
|
var PoolConfig = (function () {
|
21
|
-
function PoolConfig(programId, cluster, poolName, poolAddress, lpTokenMint, lpDecimals, perpetuals, transferAuthority, multisig, tokens, custodies) {
|
21
|
+
function PoolConfig(programId, cluster, poolName, poolAddress, lpTokenMint, lpDecimals, perpetuals, transferAuthority, multisig, addressLookupTableAddresses, tokens, custodies) {
|
22
22
|
var _this = this;
|
23
23
|
this.programId = programId;
|
24
24
|
this.cluster = cluster;
|
@@ -29,6 +29,7 @@ var PoolConfig = (function () {
|
|
29
29
|
this.perpetuals = perpetuals;
|
30
30
|
this.transferAuthority = transferAuthority;
|
31
31
|
this.multisig = multisig;
|
32
|
+
this.addressLookupTableAddresses = addressLookupTableAddresses;
|
32
33
|
this.tokens = tokens;
|
33
34
|
this.custodies = custodies;
|
34
35
|
this.getTokenFromSymbol = function (symbol) {
|
@@ -86,7 +87,10 @@ var PoolConfig = (function () {
|
|
86
87
|
var _a;
|
87
88
|
return __assign(__assign({}, i), { custodyId: (_a = i === null || i === void 0 ? void 0 : i.custodyId) !== null && _a !== void 0 ? _a : index, custodyAccount: new web3_js_1.PublicKey(i.custodyAccount), tokenAccount: new web3_js_1.PublicKey(i.tokenAccount), mintKey: new web3_js_1.PublicKey(i.mintKey), oracleAddress: new web3_js_1.PublicKey(i.oracleAddress) });
|
88
89
|
});
|
89
|
-
|
90
|
+
var addressLookupTableAddresses = poolConfig['addressLookupTableAddresses'].map(function (i) {
|
91
|
+
return new web3_js_1.PublicKey(i);
|
92
|
+
});
|
93
|
+
return new PoolConfig(new web3_js_1.PublicKey(poolConfig.programId), poolConfig.cluster, poolConfig.poolName, new web3_js_1.PublicKey(poolConfig.poolAddress), new web3_js_1.PublicKey(poolConfig.lpTokenMint), poolConfig.lpDecimals, new web3_js_1.PublicKey(poolConfig.perpetuals), new web3_js_1.PublicKey(poolConfig.transferAuthority), new web3_js_1.PublicKey(poolConfig.multisig), addressLookupTableAddresses, tokens, custodies);
|
90
94
|
};
|
91
95
|
PoolConfig.fromIdsByPk = function (poolPk, cluster) {
|
92
96
|
var poolConfig = PoolConfig_json_1.default.pools.find(function (pool) { return pool['poolAddress'] === poolPk.toString() && cluster === pool['cluster']; });
|
@@ -98,7 +102,10 @@ var PoolConfig = (function () {
|
|
98
102
|
var custodies = poolConfig['custodies'].map(function (i) {
|
99
103
|
return __assign(__assign({}, i), { custodyAccount: new web3_js_1.PublicKey(i.custodyAccount), tokenAccount: new web3_js_1.PublicKey(i.tokenAccount), mintKey: new web3_js_1.PublicKey(i.mintKey), oracleAddress: new web3_js_1.PublicKey(i.oracleAddress) });
|
100
104
|
});
|
101
|
-
|
105
|
+
var addressLookupTableAddresses = poolConfig['addressLookupTableAddresses'].map(function (i) {
|
106
|
+
return new web3_js_1.PublicKey(i);
|
107
|
+
});
|
108
|
+
return new PoolConfig(new web3_js_1.PublicKey(poolConfig.programId), poolConfig.cluster, poolConfig.poolName, new web3_js_1.PublicKey(poolConfig.poolAddress), new web3_js_1.PublicKey(poolConfig.lpTokenMint), poolConfig.lpDecimals, new web3_js_1.PublicKey(poolConfig.perpetuals), new web3_js_1.PublicKey(poolConfig.transferAuthority), new web3_js_1.PublicKey(poolConfig.multisig), addressLookupTableAddresses, tokens, custodies);
|
102
109
|
};
|
103
110
|
return PoolConfig;
|
104
111
|
}());
|
package/dist/PoolConfig.json
CHANGED
@@ -16,6 +16,7 @@
|
|
16
16
|
"perpetuals": "8iou5Rt7J89uhPwL5kkEcRdwLWwy5AzrWHxRnFqfFkL3",
|
17
17
|
"transferAuthority": "45McQhLvcCTqKs9ua1c4SauiTWFB4KRfobbwh2h74etc",
|
18
18
|
"multisig": "3Uj5gn8NA8swzRz6J8LGorhCxPA4eRa6XhnJeeADV3CZ",
|
19
|
+
"addressLookupTableAddresses": ["4Rc16Rx7GJFAXLCy1qFbQUSTUEvS5YSAVWwRzHh2ys2b"],
|
19
20
|
"tokens": [
|
20
21
|
{
|
21
22
|
"symbol": "USDC",
|
@@ -106,6 +107,7 @@
|
|
106
107
|
"perpetuals": "GZTJamEMs5fhCh6y4fRskTA9n8UsXSAWpQNd2sesevLX",
|
107
108
|
"transferAuthority": "FidHtZMaZXzUBcfqTt9jHffNoydHP4RGiaVwwoE15mMu",
|
108
109
|
"multisig": "4cMawSeiiJe6JKxF4Qzc3NQ1ZAJ37gVdsd6LF27gZBv9",
|
110
|
+
"addressLookupTableAddresses": ["4Rc16Rx7GJFAXLCy1qFbQUSTUEvS5YSAVWwRzHh2ys2b"],
|
109
111
|
"tokens": [
|
110
112
|
{
|
111
113
|
"symbol": "USDC",
|
@@ -196,6 +198,7 @@
|
|
196
198
|
"perpetuals": "GKXKKi5bj9P2LsCBqFSKwhKfRM7MJrA4qyEMGXzNQcTz",
|
197
199
|
"transferAuthority": "xeizPZDpXPDfu939cxNS27AoAkgw7fJKY4gxbK8khFA",
|
198
200
|
"multisig": "84zJ1bS8w2Fn555qC7BkS8eNDMHpTKN48ZSyaSMSyjdT",
|
201
|
+
"addressLookupTableAddresses": ["4Rc16Rx7GJFAXLCy1qFbQUSTUEvS5YSAVWwRzHh2ys2b"],
|
199
202
|
"tokens": [
|
200
203
|
{
|
201
204
|
"symbol": "USDC",
|
@@ -275,6 +278,7 @@
|
|
275
278
|
"perpetuals": "23APwx3K4h7b2FwVYPCc6QUhjxq1HnfiLF5gJGzjjBug",
|
276
279
|
"transferAuthority": "HgM32odRRY36KSmGjAdypSuN5e4QnRdGqQMXMz3Vk26L",
|
277
280
|
"multisig": "CHi41aTYPbZf3M4hyT18oiafKQLZZNw8e9VRyUAr2Hgz",
|
281
|
+
"addressLookupTableAddresses": ["4Rc16Rx7GJFAXLCy1qFbQUSTUEvS5YSAVWwRzHh2ys2b"],
|
278
282
|
"tokens": [
|
279
283
|
{
|
280
284
|
"symbol": "USDC",
|
@@ -322,6 +326,7 @@
|
|
322
326
|
"perpetuals": "5CpxhcrfvH8s9QDT2nMaPWqPoMwpuiPuP8e8x4YN61A2",
|
323
327
|
"transferAuthority": "",
|
324
328
|
"multisig": "",
|
329
|
+
"addressLookupTableAddresses": ["4Rc16Rx7GJFAXLCy1qFbQUSTUEvS5YSAVWwRzHh2ys2b"],
|
325
330
|
"tokens": [
|
326
331
|
{
|
327
332
|
"symbol": "USDC",
|
@@ -369,6 +374,7 @@
|
|
369
374
|
"perpetuals": "5CpxhcrfvH8s9QDT2nMaPWqPoMwpuiPuP8e8x4YN61A2",
|
370
375
|
"transferAuthority": "",
|
371
376
|
"multisig": "",
|
377
|
+
"addressLookupTableAddresses": ["4Rc16Rx7GJFAXLCy1qFbQUSTUEvS5YSAVWwRzHh2ys2b"],
|
372
378
|
"tokens": [
|
373
379
|
{
|
374
380
|
"symbol": "Test",
|