flash-sdk 11.0.3 → 11.0.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.
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { BN } from "@coral-xyz/anchor";
2
3
  import { ContractOraclePrice } from "./types";
3
4
  export declare class OraclePrice {
@@ -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 { LimitOrder, Order, TriggerOrder } from "./types";
@@ -1,3 +1,5 @@
1
+ /// <reference types="bn.js" />
2
+ /// <reference types="node" />
1
3
  import { Program, AnchorProvider, BN } from "@coral-xyz/anchor";
2
4
  import { PublicKey, TransactionInstruction, Commitment, Signer, AddressLookupTableAccount, VersionedTransaction } from "@solana/web3.js";
3
5
  import { PoolAccount } from "./PoolAccount";
@@ -42,6 +44,8 @@ export declare class PerpetualsClient {
42
44
  };
43
45
  addressLookupTables: AddressLookupTableAccount[];
44
46
  pusherAddressLookupTables: AddressLookupTableAccount;
47
+ private poolAddressLookupTables;
48
+ private poolPusherAddressLookupTables;
45
49
  eventAuthority: {
46
50
  publicKey: PublicKey;
47
51
  bump: number;
@@ -59,6 +63,9 @@ export declare class PerpetualsClient {
59
63
  constructor(provider: AnchorProvider, programId: PublicKey, composabilityProgramId: PublicKey, fbNftRewardProgramId: PublicKey, rewardDistributionProgramId: PublicKey, opts: PerpClientOptions, useExtOracleAccount?: boolean);
60
64
  setPrioritizationFee: (fee: number) => void;
61
65
  loadAddressLookupTable: (poolConfig: PoolConfig) => Promise<void>;
66
+ getOrLoadAddressLookupTable: (poolConfig: PoolConfig) => Promise<{
67
+ addressLookupTables: AddressLookupTableAccount[];
68
+ }>;
62
69
  findProgramAddress: (label: string, extraSeeds?: any) => {
63
70
  publicKey: PublicKey;
64
71
  bump: number;
@@ -20,8 +20,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
20
20
  });
21
21
  };
22
22
  var __generator = (this && this.__generator) || function (thisArg, body) {
23
- 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);
24
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
25
  function verb(n) { return function (v) { return step([n, v]); }; }
26
26
  function step(op) {
27
27
  if (f) throw new TypeError("Generator is already executing.");
@@ -87,6 +87,8 @@ var PerpetualsClient = (function () {
87
87
  var _this = this;
88
88
  var _a;
89
89
  this.addressLookupTables = [];
90
+ this.poolAddressLookupTables = new Map();
91
+ this.poolPusherAddressLookupTables = new Map();
90
92
  this.setPrioritizationFee = function (fee) {
91
93
  _this.prioritizationFee = fee;
92
94
  };
@@ -127,6 +129,55 @@ var PerpetualsClient = (function () {
127
129
  }
128
130
  });
129
131
  }); };
132
+ this.getOrLoadAddressLookupTable = function (poolConfig) { return __awaiter(_this, void 0, void 0, function () {
133
+ var addresses, addressesToLoad, _i, _a, address, addressKey, cached, _b, addressesToLoad_1, address, addressLookupTable, accCreationLamports;
134
+ return __generator(this, function (_c) {
135
+ switch (_c.label) {
136
+ case 0:
137
+ addresses = [];
138
+ addressesToLoad = [];
139
+ for (_i = 0, _a = poolConfig.addressLookupTableAddresses; _i < _a.length; _i++) {
140
+ address = _a[_i];
141
+ addressKey = address.toBase58();
142
+ cached = this.poolAddressLookupTables.get(addressKey);
143
+ if (cached) {
144
+ addresses.push(cached);
145
+ }
146
+ else {
147
+ addressesToLoad.push(address);
148
+ }
149
+ }
150
+ _b = 0, addressesToLoad_1 = addressesToLoad;
151
+ _c.label = 1;
152
+ case 1:
153
+ if (!(_b < addressesToLoad_1.length)) return [3, 4];
154
+ address = addressesToLoad_1[_b];
155
+ return [4, this.provider.connection.getAddressLookupTable(address)];
156
+ case 2:
157
+ addressLookupTable = (_c.sent()).value;
158
+ if (addressLookupTable) {
159
+ addresses.push(addressLookupTable);
160
+ this.poolAddressLookupTables.set(address.toBase58(), addressLookupTable);
161
+ }
162
+ _c.label = 3;
163
+ case 3:
164
+ _b++;
165
+ return [3, 1];
166
+ case 4:
167
+ if (!!this.minimumBalanceForRentExemptAccountLamports) return [3, 6];
168
+ return [4, (0, spl_token_1.getMinimumBalanceForRentExemptAccount)(this.provider.connection)];
169
+ case 5:
170
+ accCreationLamports = (_c.sent());
171
+ if (accCreationLamports) {
172
+ this.minimumBalanceForRentExemptAccountLamports = accCreationLamports;
173
+ }
174
+ _c.label = 6;
175
+ case 6: return [2, {
176
+ addressLookupTables: addresses,
177
+ }];
178
+ }
179
+ });
180
+ }); };
130
181
  this.findProgramAddress = function (label, extraSeeds) {
131
182
  if (extraSeeds === void 0) { extraSeeds = null; }
132
183
  var seeds = [Buffer.from(anchor_1.utils.bytes.utf8.encode(label))];
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { BN } from "@coral-xyz/anchor";
2
3
  import { Pool, TokenRatios, StakeStats, CompoundingStats, Permissions } from "./types";
3
4
  import { PublicKey } from "@solana/web3.js";
@@ -1988,7 +1988,7 @@
1988
1988
  "protocolTokenAccount": "9iQ9saFbTfYPHsJwnKY9BMc7xACxEL9mcHrP7qYWoTKG",
1989
1989
  "multisig": "3FqKnAQrvr6G6AqCAWKdqg9fVe6ceAk3A5Y1ibeQqV2V",
1990
1990
  "addressLookupTableAddresses": [
1991
- "9CPDEJSfHpqbTTNkbTmGJcbBgADAMWu56mXf1kzMybvY"
1991
+ "E7n29qz5bLuwTxxPJx5Ypr6sEDH122zqWWR9rJEA1Rb3"
1992
1992
  ],
1993
1993
  "pusherAddressLookupTableAddress": "2bSPovsf8bttn2D1pE18efpXk5HQGnRgeEGZuVFJf8Qm",
1994
1994
  "backupOracle": "AjAubETeBLhebBxLcErmzbavZfqF9bCxkpRAdyJtoi9G",
@@ -2184,7 +2184,168 @@
2184
2184
  "pythPriceId": "0x19e09bb805456ada3979a7d1cbb4b6d63babc3a0f8e8a9509f68afa5c4c11cd5"
2185
2185
  }
2186
2186
  ],
2187
- "markets": []
2187
+ "markets": [
2188
+ {
2189
+ "marketId": 0,
2190
+ "marketAccount": "HChXe7VQno8NCibktPhxmeF46vqDx6MQJYRqjdFVAS1P",
2191
+ "marketCorrelation": true,
2192
+ "pool": "AKqWYgwiM198BsvuSqWQs1x5FSVRJfo8MNABEQjzsDJk",
2193
+ "targetCustody": "FxgR3FNcBQksFhtFz4XqLNMmW7UJnh4XMXS7Z69dnzP",
2194
+ "collateralCustody": "FxgR3FNcBQksFhtFz4XqLNMmW7UJnh4XMXS7Z69dnzP",
2195
+ "side": "long",
2196
+ "maxLev": 10,
2197
+ "degenMinLev": 1,
2198
+ "degenMaxLev": 10,
2199
+ "targetCustodyId": 1,
2200
+ "collateralCustodyId": 1,
2201
+ "targetMint": "FJug3z58gssSTDhVNkTse5fP8GRZzuidf9SRtfB2RhDe",
2202
+ "collateralMint": "FJug3z58gssSTDhVNkTse5fP8GRZzuidf9SRtfB2RhDe"
2203
+ },
2204
+ {
2205
+ "marketId": 1,
2206
+ "marketAccount": "HVrhLdy6ZnB9iA8jKyMjugZqWR9K39Sk68k2eHgH77CU",
2207
+ "marketCorrelation": false,
2208
+ "pool": "AKqWYgwiM198BsvuSqWQs1x5FSVRJfo8MNABEQjzsDJk",
2209
+ "targetCustody": "FxgR3FNcBQksFhtFz4XqLNMmW7UJnh4XMXS7Z69dnzP",
2210
+ "collateralCustody": "ChE66qGH61VCZCcj28gJnQtUSBQjJYHbrkDPEbKWsWum",
2211
+ "side": "short",
2212
+ "maxLev": 10,
2213
+ "degenMinLev": 1,
2214
+ "degenMaxLev": 10,
2215
+ "targetCustodyId": 1,
2216
+ "collateralCustodyId": 0,
2217
+ "targetMint": "FJug3z58gssSTDhVNkTse5fP8GRZzuidf9SRtfB2RhDe",
2218
+ "collateralMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
2219
+ },
2220
+ {
2221
+ "marketId": 2,
2222
+ "marketAccount": "C4EQ7SmVtAX883CmhbqkiHCpPvgKw25rKCU9br7NuDt",
2223
+ "marketCorrelation": true,
2224
+ "pool": "AKqWYgwiM198BsvuSqWQs1x5FSVRJfo8MNABEQjzsDJk",
2225
+ "targetCustody": "D17qcndkxngcrNgLfTHnrSoomggVT3PsdnACMUQzQENR",
2226
+ "collateralCustody": "D17qcndkxngcrNgLfTHnrSoomggVT3PsdnACMUQzQENR",
2227
+ "side": "long",
2228
+ "maxLev": 10,
2229
+ "degenMinLev": 1,
2230
+ "degenMaxLev": 10,
2231
+ "targetCustodyId": 2,
2232
+ "collateralCustodyId": 2,
2233
+ "targetMint": "ALTP6gug9wv5mFtx2tSU1YYZ1NrEc2chDdMPoJA8f8pu",
2234
+ "collateralMint": "ALTP6gug9wv5mFtx2tSU1YYZ1NrEc2chDdMPoJA8f8pu"
2235
+ },
2236
+ {
2237
+ "marketId": 3,
2238
+ "marketAccount": "4jh665tA49K3Viqm5HF1gjxuAQ3XEyf5FfkgrbTs9uiF",
2239
+ "marketCorrelation": false,
2240
+ "pool": "AKqWYgwiM198BsvuSqWQs1x5FSVRJfo8MNABEQjzsDJk",
2241
+ "targetCustody": "D17qcndkxngcrNgLfTHnrSoomggVT3PsdnACMUQzQENR",
2242
+ "collateralCustody": "ChE66qGH61VCZCcj28gJnQtUSBQjJYHbrkDPEbKWsWum",
2243
+ "side": "short",
2244
+ "maxLev": 10,
2245
+ "degenMinLev": 1,
2246
+ "degenMaxLev": 10,
2247
+ "targetCustodyId": 2,
2248
+ "collateralCustodyId": 0,
2249
+ "targetMint": "ALTP6gug9wv5mFtx2tSU1YYZ1NrEc2chDdMPoJA8f8pu",
2250
+ "collateralMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
2251
+ },
2252
+ {
2253
+ "marketId": 4,
2254
+ "marketAccount": "FKrWRnJRzyDfojB91S6BsqA1a7WMT6j2VgfzhzWdoP6c",
2255
+ "marketCorrelation": true,
2256
+ "pool": "AKqWYgwiM198BsvuSqWQs1x5FSVRJfo8MNABEQjzsDJk",
2257
+ "targetCustody": "BPGMbb1z4q9v384FXp8MeBKn2L28xuzAGiF5iKKiqSTX",
2258
+ "collateralCustody": "BPGMbb1z4q9v384FXp8MeBKn2L28xuzAGiF5iKKiqSTX",
2259
+ "side": "long",
2260
+ "maxLev": 10,
2261
+ "degenMinLev": 1,
2262
+ "degenMaxLev": 10,
2263
+ "targetCustodyId": 3,
2264
+ "collateralCustodyId": 3,
2265
+ "targetMint": "5fKr9joRHpioriGmMgRVFdmZge8EVUTbrWyxDVdSrcuG",
2266
+ "collateralMint": "5fKr9joRHpioriGmMgRVFdmZge8EVUTbrWyxDVdSrcuG"
2267
+ },
2268
+ {
2269
+ "marketId": 5,
2270
+ "marketAccount": "6QGkLYo2wfCNDLb9jPor7NKzeKm5mbykMQSfkvF4D7BY",
2271
+ "marketCorrelation": false,
2272
+ "pool": "AKqWYgwiM198BsvuSqWQs1x5FSVRJfo8MNABEQjzsDJk",
2273
+ "targetCustody": "BPGMbb1z4q9v384FXp8MeBKn2L28xuzAGiF5iKKiqSTX",
2274
+ "collateralCustody": "ChE66qGH61VCZCcj28gJnQtUSBQjJYHbrkDPEbKWsWum",
2275
+ "side": "short",
2276
+ "maxLev": 10,
2277
+ "degenMinLev": 1,
2278
+ "degenMaxLev": 10,
2279
+ "targetCustodyId": 3,
2280
+ "collateralCustodyId": 0,
2281
+ "targetMint": "5fKr9joRHpioriGmMgRVFdmZge8EVUTbrWyxDVdSrcuG",
2282
+ "collateralMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
2283
+ },
2284
+ {
2285
+ "marketId": 6,
2286
+ "marketAccount": "A1SwvNmLVxC9MZVwgsra5TR4ajRAn9nrd7dsoXmGMEZN",
2287
+ "marketCorrelation": true,
2288
+ "pool": "AKqWYgwiM198BsvuSqWQs1x5FSVRJfo8MNABEQjzsDJk",
2289
+ "targetCustody": "D4qqPNBBoHEHdhv2zMKy9HCSGtDPkkS6fYyoZAv8Rjyk",
2290
+ "collateralCustody": "D4qqPNBBoHEHdhv2zMKy9HCSGtDPkkS6fYyoZAv8Rjyk",
2291
+ "side": "long",
2292
+ "maxLev": 10,
2293
+ "degenMinLev": 1,
2294
+ "degenMaxLev": 10,
2295
+ "targetCustodyId": 4,
2296
+ "collateralCustodyId": 4,
2297
+ "targetMint": "B8GKqTDGYc7F6udTHjYeazZ4dFCRkrwK2mBQNS4igqTv",
2298
+ "collateralMint": "B8GKqTDGYc7F6udTHjYeazZ4dFCRkrwK2mBQNS4igqTv"
2299
+ },
2300
+ {
2301
+ "marketId": 7,
2302
+ "marketAccount": "DgN2rmpxEWbVqGbmUVbpYZv7HnbNDwxG92smPN6264kd",
2303
+ "marketCorrelation": false,
2304
+ "pool": "AKqWYgwiM198BsvuSqWQs1x5FSVRJfo8MNABEQjzsDJk",
2305
+ "targetCustody": "D4qqPNBBoHEHdhv2zMKy9HCSGtDPkkS6fYyoZAv8Rjyk",
2306
+ "collateralCustody": "ChE66qGH61VCZCcj28gJnQtUSBQjJYHbrkDPEbKWsWum",
2307
+ "side": "short",
2308
+ "maxLev": 10,
2309
+ "degenMinLev": 1,
2310
+ "degenMaxLev": 10,
2311
+ "targetCustodyId": 4,
2312
+ "collateralCustodyId": 0,
2313
+ "targetMint": "B8GKqTDGYc7F6udTHjYeazZ4dFCRkrwK2mBQNS4igqTv",
2314
+ "collateralMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
2315
+ },
2316
+ {
2317
+ "marketId": 8,
2318
+ "marketAccount": "3qnjU7nWZTNR5uPeGsn5mBLiLA4GhWtNPvR8SEL9eyd3",
2319
+ "marketCorrelation": true,
2320
+ "pool": "AKqWYgwiM198BsvuSqWQs1x5FSVRJfo8MNABEQjzsDJk",
2321
+ "targetCustody": "7aYwYutvCFXRta4vpY6MQ8PFPuyq4SEn9trabziYsvqV",
2322
+ "collateralCustody": "7aYwYutvCFXRta4vpY6MQ8PFPuyq4SEn9trabziYsvqV",
2323
+ "side": "long",
2324
+ "maxLev": 10,
2325
+ "degenMinLev": 1,
2326
+ "degenMaxLev": 10,
2327
+ "targetCustodyId": 5,
2328
+ "collateralCustodyId": 5,
2329
+ "targetMint": "AVw2QGVkXJPRPRjLAceXVoLqU5DVtJ53mdgMXp14yGit",
2330
+ "collateralMint": "AVw2QGVkXJPRPRjLAceXVoLqU5DVtJ53mdgMXp14yGit"
2331
+ },
2332
+ {
2333
+ "marketId": 9,
2334
+ "marketAccount": "7beyssSzHubzxMy4yTNK5zZxxXcyJ219Q2a43H7GtPBC",
2335
+ "marketCorrelation": false,
2336
+ "pool": "AKqWYgwiM198BsvuSqWQs1x5FSVRJfo8MNABEQjzsDJk",
2337
+ "targetCustody": "7aYwYutvCFXRta4vpY6MQ8PFPuyq4SEn9trabziYsvqV",
2338
+ "collateralCustody": "ChE66qGH61VCZCcj28gJnQtUSBQjJYHbrkDPEbKWsWum",
2339
+ "side": "short",
2340
+ "maxLev": 10,
2341
+ "degenMinLev": 1,
2342
+ "degenMaxLev": 10,
2343
+ "targetCustodyId": 5,
2344
+ "collateralCustodyId": 0,
2345
+ "targetMint": "AVw2QGVkXJPRPRjLAceXVoLqU5DVtJ53mdgMXp14yGit",
2346
+ "collateralMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
2347
+ }
2348
+ ]
2188
2349
  },
2189
2350
  {
2190
2351
  "programId": "FTPP4jEWW1n8s2FEccwVfS9KCPjpndaswg7Nkkuz4ER4",
@@ -4226,7 +4387,168 @@
4226
4387
  "pythPriceId": "0x19e09bb805456ada3979a7d1cbb4b6d63babc3a0f8e8a9509f68afa5c4c11cd5"
4227
4388
  }
4228
4389
  ],
4229
- "markets": []
4390
+ "markets": [
4391
+ {
4392
+ "marketId": 0,
4393
+ "marketAccount": "H1E3Z2GoxPiyNVMyuqVP33aRGpBJFqBt3FD8p5yb5AD6",
4394
+ "marketCorrelation": true,
4395
+ "pool": "C8oensjR4xowfZAxAVviWDp8JGHzHAqKg14fg7vX44VH",
4396
+ "targetCustody": "4BtySgvArhrkCJntUSMmpjUK4ueNkocMkzJErmfL87At",
4397
+ "collateralCustody": "4BtySgvArhrkCJntUSMmpjUK4ueNkocMkzJErmfL87At",
4398
+ "side": "long",
4399
+ "maxLev": 10,
4400
+ "degenMinLev": 1,
4401
+ "degenMaxLev": 10,
4402
+ "targetCustodyId": 1,
4403
+ "collateralCustodyId": 1,
4404
+ "targetMint": "ts1aDtA2pHaFrMRDcy5YsK6giEbrABDfv1PkQK21Kga",
4405
+ "collateralMint": "ts1aDtA2pHaFrMRDcy5YsK6giEbrABDfv1PkQK21Kga"
4406
+ },
4407
+ {
4408
+ "marketId": 1,
4409
+ "marketAccount": "9Ar2Jro5AKiJaSxC4J97tzFLebA6CnikWHwQH66VThXU",
4410
+ "marketCorrelation": false,
4411
+ "pool": "C8oensjR4xowfZAxAVviWDp8JGHzHAqKg14fg7vX44VH",
4412
+ "targetCustody": "4BtySgvArhrkCJntUSMmpjUK4ueNkocMkzJErmfL87At",
4413
+ "collateralCustody": "A4RCSednDMqEpnV3BFdiDAJWyzT9QM2aNh9FCY8Pen94",
4414
+ "side": "short",
4415
+ "maxLev": 10,
4416
+ "degenMinLev": 1,
4417
+ "degenMaxLev": 10,
4418
+ "targetCustodyId": 1,
4419
+ "collateralCustodyId": 0,
4420
+ "targetMint": "ts1aDtA2pHaFrMRDcy5YsK6giEbrABDfv1PkQK21Kga",
4421
+ "collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
4422
+ },
4423
+ {
4424
+ "marketId": 2,
4425
+ "marketAccount": "36mipFDqLD8fUMN4JgJGQMmfFJFm7NGAgmUmm9AChVtR",
4426
+ "marketCorrelation": true,
4427
+ "pool": "C8oensjR4xowfZAxAVviWDp8JGHzHAqKg14fg7vX44VH",
4428
+ "targetCustody": "2A3harPJCzK7kbnNnz81Aywu4Z3L98m7Ew39PZQ6jfDu",
4429
+ "collateralCustody": "2A3harPJCzK7kbnNnz81Aywu4Z3L98m7Ew39PZQ6jfDu",
4430
+ "side": "long",
4431
+ "maxLev": 10,
4432
+ "degenMinLev": 1,
4433
+ "degenMaxLev": 10,
4434
+ "targetCustodyId": 2,
4435
+ "collateralCustodyId": 2,
4436
+ "targetMint": "nvdtJJCvPEuULW33UkodP1WPyZBr3wZt4FTTEf8F5AY",
4437
+ "collateralMint": "nvdtJJCvPEuULW33UkodP1WPyZBr3wZt4FTTEf8F5AY"
4438
+ },
4439
+ {
4440
+ "marketId": 3,
4441
+ "marketAccount": "DYKTbwZPfdGbBpY7NssN7Vfm3fp9RpXS3gPfsSj9FQGa",
4442
+ "marketCorrelation": false,
4443
+ "pool": "C8oensjR4xowfZAxAVviWDp8JGHzHAqKg14fg7vX44VH",
4444
+ "targetCustody": "2A3harPJCzK7kbnNnz81Aywu4Z3L98m7Ew39PZQ6jfDu",
4445
+ "collateralCustody": "A4RCSednDMqEpnV3BFdiDAJWyzT9QM2aNh9FCY8Pen94",
4446
+ "side": "short",
4447
+ "maxLev": 10,
4448
+ "degenMinLev": 1,
4449
+ "degenMaxLev": 10,
4450
+ "targetCustodyId": 2,
4451
+ "collateralCustodyId": 0,
4452
+ "targetMint": "nvdtJJCvPEuULW33UkodP1WPyZBr3wZt4FTTEf8F5AY",
4453
+ "collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
4454
+ },
4455
+ {
4456
+ "marketId": 4,
4457
+ "marketAccount": "HMYRoC4qU3fsF4S6KqRGN5J6Zc6Y5r6i27X658znVtMZ",
4458
+ "marketCorrelation": true,
4459
+ "pool": "C8oensjR4xowfZAxAVviWDp8JGHzHAqKg14fg7vX44VH",
4460
+ "targetCustody": "98jBsDwsc48Rz7kyzT3TKAsSAp52MbyU3YVhNHWDPrWB",
4461
+ "collateralCustody": "98jBsDwsc48Rz7kyzT3TKAsSAp52MbyU3YVhNHWDPrWB",
4462
+ "side": "long",
4463
+ "maxLev": 10,
4464
+ "degenMinLev": 1,
4465
+ "degenMaxLev": 10,
4466
+ "targetCustodyId": 3,
4467
+ "collateralCustodyId": 3,
4468
+ "targetMint": "crcSSShvEkSjtKsThPxW9rbdHD8aiTiM9w5zEZSzisM",
4469
+ "collateralMint": "crcSSShvEkSjtKsThPxW9rbdHD8aiTiM9w5zEZSzisM"
4470
+ },
4471
+ {
4472
+ "marketId": 5,
4473
+ "marketAccount": "35ZTrsgaGbhzyPpq1a7q3u1p3z6cpyZyrFjBdmr4dL6Z",
4474
+ "marketCorrelation": false,
4475
+ "pool": "C8oensjR4xowfZAxAVviWDp8JGHzHAqKg14fg7vX44VH",
4476
+ "targetCustody": "98jBsDwsc48Rz7kyzT3TKAsSAp52MbyU3YVhNHWDPrWB",
4477
+ "collateralCustody": "A4RCSednDMqEpnV3BFdiDAJWyzT9QM2aNh9FCY8Pen94",
4478
+ "side": "short",
4479
+ "maxLev": 10,
4480
+ "degenMinLev": 1,
4481
+ "degenMaxLev": 10,
4482
+ "targetCustodyId": 3,
4483
+ "collateralCustodyId": 0,
4484
+ "targetMint": "crcSSShvEkSjtKsThPxW9rbdHD8aiTiM9w5zEZSzisM",
4485
+ "collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
4486
+ },
4487
+ {
4488
+ "marketId": 6,
4489
+ "marketAccount": "CGtBLT58U4zb6pZ96fEJr8PfvBpsjgtbP35sEVWwSyaP",
4490
+ "marketCorrelation": true,
4491
+ "pool": "C8oensjR4xowfZAxAVviWDp8JGHzHAqKg14fg7vX44VH",
4492
+ "targetCustody": "AGb19zsHtpJaHzLbBHThykVqdU2EjjYrqNxiTmRgAnNC",
4493
+ "collateralCustody": "AGb19zsHtpJaHzLbBHThykVqdU2EjjYrqNxiTmRgAnNC",
4494
+ "side": "long",
4495
+ "maxLev": 10,
4496
+ "degenMinLev": 1,
4497
+ "degenMaxLev": 10,
4498
+ "targetCustodyId": 4,
4499
+ "collateralCustodyId": 4,
4500
+ "targetMint": "mstrRvtbGpUwSTVaNePMRDtepsNidLPtJ35WnNFubBY",
4501
+ "collateralMint": "mstrRvtbGpUwSTVaNePMRDtepsNidLPtJ35WnNFubBY"
4502
+ },
4503
+ {
4504
+ "marketId": 7,
4505
+ "marketAccount": "7QRNTbxuCVLxjMkbHf6wbHnwUAYdi41cWjX34cmMap8d",
4506
+ "marketCorrelation": false,
4507
+ "pool": "C8oensjR4xowfZAxAVviWDp8JGHzHAqKg14fg7vX44VH",
4508
+ "targetCustody": "AGb19zsHtpJaHzLbBHThykVqdU2EjjYrqNxiTmRgAnNC",
4509
+ "collateralCustody": "A4RCSednDMqEpnV3BFdiDAJWyzT9QM2aNh9FCY8Pen94",
4510
+ "side": "short",
4511
+ "maxLev": 10,
4512
+ "degenMinLev": 1,
4513
+ "degenMaxLev": 10,
4514
+ "targetCustodyId": 4,
4515
+ "collateralCustodyId": 0,
4516
+ "targetMint": "mstrRvtbGpUwSTVaNePMRDtepsNidLPtJ35WnNFubBY",
4517
+ "collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
4518
+ },
4519
+ {
4520
+ "marketId": 8,
4521
+ "marketAccount": "4QQ42SdZ7ng8iiKJND4gZiDRUkrL9MJ3pRzQQ8ATPyzj",
4522
+ "marketCorrelation": true,
4523
+ "pool": "C8oensjR4xowfZAxAVviWDp8JGHzHAqKg14fg7vX44VH",
4524
+ "targetCustody": "5hteknd3WimjZFiFmgg6GsApKcGcviFuFwFMWJJMtQmv",
4525
+ "collateralCustody": "5hteknd3WimjZFiFmgg6GsApKcGcviFuFwFMWJJMtQmv",
4526
+ "side": "long",
4527
+ "maxLev": 10,
4528
+ "degenMinLev": 1,
4529
+ "degenMaxLev": 10,
4530
+ "targetCustodyId": 5,
4531
+ "collateralCustodyId": 5,
4532
+ "targetMint": "spyK8TuzAF1iwcJtzysb7J5u8e4yymtpUMhVLZrKz2r",
4533
+ "collateralMint": "spyK8TuzAF1iwcJtzysb7J5u8e4yymtpUMhVLZrKz2r"
4534
+ },
4535
+ {
4536
+ "marketId": 9,
4537
+ "marketAccount": "5Y99bpvkNX1cgpJa38VqMdHD6BKwFptzQjagzjEDwmWi",
4538
+ "marketCorrelation": false,
4539
+ "pool": "C8oensjR4xowfZAxAVviWDp8JGHzHAqKg14fg7vX44VH",
4540
+ "targetCustody": "5hteknd3WimjZFiFmgg6GsApKcGcviFuFwFMWJJMtQmv",
4541
+ "collateralCustody": "A4RCSednDMqEpnV3BFdiDAJWyzT9QM2aNh9FCY8Pen94",
4542
+ "side": "short",
4543
+ "maxLev": 10,
4544
+ "degenMinLev": 1,
4545
+ "degenMaxLev": 10,
4546
+ "targetCustodyId": 5,
4547
+ "collateralCustodyId": 0,
4548
+ "targetMint": "spyK8TuzAF1iwcJtzysb7J5u8e4yymtpUMhVLZrKz2r",
4549
+ "collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
4550
+ }
4551
+ ]
4230
4552
  },
4231
4553
  {
4232
4554
  "programId": "FTPP4jEWW1n8s2FEccwVfS9KCPjpndaswg7Nkkuz4ER4",
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { BN } from "@coral-xyz/anchor";
2
3
  import { Mint } from "@solana/spl-token";
3
4
  import { CustodyAccount } from "./CustodyAccount";
@@ -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";
@@ -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";
@@ -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 { TokenVault } from "./types";
@@ -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 = 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;
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.");
@@ -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 = 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;
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 = void 0;
44
- exports.createBackupOracleInstruction = createBackupOracleInstruction;
43
+ exports.createBackupOracleInstruction = exports.getBackupOracleInstruction = exports.getPythnetOraclePrices = exports.pythPriceServiceConnection = 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;
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { PublicKey } from '@solana/web3.js';
2
3
  export declare const PERCENTAGE_DECIMALS = 4;
3
4
  export declare const USD_DECIMALS = 6;
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export * from './TokenVaultAccount';
7
7
  export * from './TokenStakeAccount';
8
8
  export * from './OraclePrice';
9
9
  export * from './constants';
10
+ export * from './remoraTokensWithPriceIds';
10
11
  export * from './types';
11
12
  export * from './utils';
12
13
  export * from './PerpetualsClient';
package/dist/index.js CHANGED
@@ -24,6 +24,7 @@ __exportStar(require("./TokenVaultAccount"), exports);
24
24
  __exportStar(require("./TokenStakeAccount"), exports);
25
25
  __exportStar(require("./OraclePrice"), exports);
26
26
  __exportStar(require("./constants"), exports);
27
+ __exportStar(require("./remoraTokensWithPriceIds"), exports);
27
28
  __exportStar(require("./types"), exports);
28
29
  __exportStar(require("./utils"), exports);
29
30
  __exportStar(require("./PerpetualsClient"), exports);
@@ -0,0 +1,13 @@
1
+ export declare const REMORA_TOKENS_WITH_PRICE_IDS: {
2
+ symbol: string;
3
+ mintKey: string;
4
+ decimals: number;
5
+ usdPrecision: number;
6
+ tokenPrecision: number;
7
+ isStable: boolean;
8
+ isVirtual: boolean;
9
+ lazerId: number;
10
+ pythTicker: string;
11
+ pythPriceId: string;
12
+ isToken2022: boolean;
13
+ }[];