@haven-fi/solauto-sdk 1.0.745 → 1.0.746

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/README.md CHANGED
@@ -6,6 +6,7 @@ Solauto is a program on the Solana blockchain that lets you manage leveraged lon
6
6
 
7
7
  ```typescript
8
8
  import { PublicKey } from "@solana/web3.js";
9
+ import { NATIVE_MINT } from "@solana/spl-token";
9
10
  import * as solauto from "@haven-fi/solauto-sdk";
10
11
 
11
12
  // Create new Solauto client
@@ -15,8 +16,8 @@ const client = solauto.getClient(solauto.LendingPlatform.MARGINFI, {
15
16
  });
16
17
 
17
18
  // Initialize the client
18
- const supplyMint = new PublicKey(NATIVE_MINT);
19
- const debtMint = new PublicKey(USDC);
19
+ const supplyMint = NATIVE_MINT;
20
+ const debtMint = new PublicKey(solauto.USDC);
20
21
  await client.initializeNewSolautoPosition({
21
22
  positionId: 1,
22
23
  lpPoolAccount: solauto.getMarginfiAccounts().defaultGroup,
@@ -75,7 +76,6 @@ const statuses = txManager.send(transactionItems);
75
76
  ## Rebalancing an existing position
76
77
 
77
78
  ```typescript
78
- import { PublicKey } from "@solana/web3.js";
79
79
  import * as solauto from "@haven-fi/solauto-sdk";
80
80
 
81
81
  // Create new Solauto client
@@ -59,7 +59,6 @@ export declare class TransactionsManager<T extends TxHandler> {
59
59
  private updateStatusForSets;
60
60
  send(items: TransactionItem[]): Promise<TransactionManagerStatuses>;
61
61
  private shouldProceedToSend;
62
- private getTrueAttemptNum;
63
62
  private refreshItemSets;
64
63
  private processTransactionsAtomically;
65
64
  private sendJitoBundle;
@@ -1 +1 @@
1
- {"version":3,"file":"transactionsManager.d.ts","sourceRoot":"","sources":["../../../../src/services/transactions/manager/transactionsManager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAElB,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AACxB,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AAS,CAAC,EAAE,kBAAkB;IAqChC,OAAO,CAAC,gBAAgB;CAqCzB"}
@@ -46,7 +46,7 @@ class TransactionsManager {
46
46
  }
47
47
  async assembleTransactionSets(items) {
48
48
  let transactionSets = [];
49
- this.txHandler.log(`Reassembling ${items.length} items`);
49
+ (0, utils_1.consoleLog)(`Reassembling ${items.length} items`);
50
50
  const txItems = items.sort((a, b) => a.orderPrio - b.orderPrio);
51
51
  for (let i = txItems.length - 1; i >= 0;) {
52
52
  let item = txItems[i];
@@ -101,7 +101,7 @@ class TransactionsManager {
101
101
  this.statuses.push(args);
102
102
  }
103
103
  }
104
- this.txHandler.log(`${args.name} ${args.attemptNum} is ${args.status.toString().toLowerCase()}`);
104
+ (0, utils_1.consoleLog)(`${args.name} ${args.attemptNum} is ${args.status.toString().toLowerCase()}`);
105
105
  this.statusCallback?.([...this.statuses]);
106
106
  }
107
107
  async debugAccounts(itemSet, tx) {
@@ -110,11 +110,11 @@ class TransactionsManager {
110
110
  for (const ix of tx.getInstructions()) {
111
111
  const ixAccounts = ix.keys.map((x) => x.pubkey);
112
112
  const accountsNotInLut = ixAccounts.filter((x) => !lutAccounts.includes(x));
113
- this.txHandler.log(`Program ${ix.programId}, data len: ${ix.data.length}, LUT accounts data: ${ix.keys.filter((x) => lutAccounts.includes(x.pubkey)).length * 3}`);
113
+ (0, utils_1.consoleLog)(`Program ${ix.programId}, data len: ${ix.data.length}, LUT accounts data: ${ix.keys.filter((x) => lutAccounts.includes(x.pubkey)).length * 3}`);
114
114
  if (accountsNotInLut.length > 0) {
115
- this.txHandler.log(`${accountsNotInLut.length} accounts not in LUT:`);
115
+ (0, utils_1.consoleLog)(`${accountsNotInLut.length} accounts not in LUT:`);
116
116
  for (const key of accountsNotInLut) {
117
- this.txHandler.log(key.toString());
117
+ (0, utils_1.consoleLog)(key.toString());
118
118
  }
119
119
  }
120
120
  }
@@ -144,14 +144,14 @@ class TransactionsManager {
144
144
  await item.initialize();
145
145
  }
146
146
  }
147
- this.txHandler.log("Transaction items:", items.length);
147
+ (0, utils_1.consoleLog)("Transaction items:", items.length);
148
148
  return await this.assembleTransactionSets(items);
149
149
  }, this.totalRetries);
150
150
  this.updateStatusForSets(itemSets.map((x) => x.name()), {
151
151
  status: TransactionStatus.Queued,
152
152
  attemptNum: 0,
153
153
  });
154
- this.txHandler.log("Initial item sets:", itemSets.length);
154
+ (0, utils_1.consoleLog)("Initial item sets:", itemSets.length);
155
155
  if (this.atomically) {
156
156
  await this.processTransactionsAtomically(itemSets);
157
157
  }
@@ -180,13 +180,6 @@ class TransactionsManager {
180
180
  }
181
181
  return true;
182
182
  }
183
- getTrueAttemptNum(itemSetName) {
184
- const prevAttempts = this.statuses.filter((x) => x.name === itemSetName && x.status !== TransactionStatus.Queued);
185
- const attemptNum = prevAttempts.length -
186
- prevAttempts.filter((x) => x.status === TransactionStatus.Skipped)
187
- ?.length;
188
- return attemptNum;
189
- }
190
183
  async refreshItemSets(itemSets, attemptNum, prevError, currentIndex) {
191
184
  if (currentIndex !== undefined) {
192
185
  const itemSet = itemSets[currentIndex];
@@ -217,15 +210,14 @@ class TransactionsManager {
217
210
  return newItemSets;
218
211
  }
219
212
  async processTransactionsAtomically(itemSets) {
220
- await (0, utils_1.retryWithExponentialBackoff)(async (retryNum, prevError) => {
213
+ await (0, utils_1.retryWithExponentialBackoff)(async (attemptNum, prevError) => {
221
214
  if (prevError &&
222
215
  this.statuses.filter((x) => x.simulationSuccessful).length >
223
216
  this.signableRetries) {
224
217
  throw prevError;
225
218
  }
226
- const attemptNum = Math.max(...itemSets.map((x) => this.getTrueAttemptNum(x?.name() ?? "")));
227
219
  this.priorityFeeSetting = this.getUpdatedPriorityFeeSetting(prevError, attemptNum);
228
- if (retryNum > 0) {
220
+ if (attemptNum > 0) {
229
221
  const refreshedSets = await this.refreshItemSets(itemSets, attemptNum, prevError);
230
222
  if (!refreshedSets || !refreshedSets.length) {
231
223
  return;
@@ -284,14 +276,13 @@ class TransactionsManager {
284
276
  }
285
277
  async processTransactionSet(itemSets, currentIndex) {
286
278
  let itemSet = itemSets[currentIndex];
287
- await (0, utils_1.retryWithExponentialBackoff)(async (retryNum, prevError) => {
279
+ await (0, utils_1.retryWithExponentialBackoff)(async (attemptNum, prevError) => {
288
280
  if (prevError &&
289
281
  this.statuses.filter((x) => x.simulationSuccessful).length >
290
282
  this.signableRetries) {
291
283
  throw prevError;
292
284
  }
293
- const attemptNum = this.getTrueAttemptNum(itemSet?.name() ?? "");
294
- if (currentIndex > 0 || retryNum > 0) {
285
+ if (currentIndex > 0 || attemptNum > 0) {
295
286
  const refreshedSets = await this.refreshItemSets(itemSets, attemptNum, prevError, currentIndex);
296
287
  itemSet = refreshedSets ? refreshedSets[0] : undefined;
297
288
  }
@@ -338,7 +329,7 @@ class TransactionsManager {
338
329
  }
339
330
  }
340
331
  captureErrorInfo(transactions, txNames, attemptNum, error) {
341
- this.txHandler.log("Capturing error info...");
332
+ (0, utils_1.consoleLog)("Capturing error info...");
342
333
  const errorDetails = (0, transactionUtils_1.getErrorInfo)(this.txHandler.umi, transactions, error, txNames.filter((x) => this.statuses.find((y) => x === y.name && y.attemptNum === attemptNum)
343
334
  ?.simulationSuccessful).length === txNames.length, this.priorityFeeSetting);
344
335
  const errorString = `${errorDetails.errorName ?? "Unknown error"}: ${errorDetails.errorInfo?.split("\n")[0] ?? "unknown"}`;
@@ -54,7 +54,7 @@ export async function main() {
54
54
  // ),
55
55
  });
56
56
 
57
- const transactionItems = [rebalance(client, undefined, 350)];
57
+ const transactionItems = [rebalance(client)];
58
58
 
59
59
  const txManager = new ClientTransactionsManager({
60
60
  txHandler: client,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.745",
3
+ "version": "1.0.746",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "description": "Typescript SDK for the Solauto program on the Solana blockchain",
@@ -101,7 +101,7 @@ export class TransactionsManager<T extends TxHandler> {
101
101
  items: TransactionItem[]
102
102
  ): Promise<TransactionSet[]> {
103
103
  let transactionSets: TransactionSet[] = [];
104
- this.txHandler.log(`Reassembling ${items.length} items`);
104
+ consoleLog(`Reassembling ${items.length} items`);
105
105
 
106
106
  const txItems = items.sort((a, b) => a.orderPrio - b.orderPrio);
107
107
 
@@ -164,7 +164,7 @@ export class TransactionsManager<T extends TxHandler> {
164
164
  this.statuses.push(args);
165
165
  }
166
166
  }
167
- this.txHandler.log(
167
+ consoleLog(
168
168
  `${args.name} ${args.attemptNum} is ${args.status.toString().toLowerCase()}`
169
169
  );
170
170
  this.statusCallback?.([...this.statuses]);
@@ -178,13 +178,13 @@ export class TransactionsManager<T extends TxHandler> {
178
178
  const accountsNotInLut = ixAccounts.filter(
179
179
  (x) => !lutAccounts.includes(x)
180
180
  );
181
- this.txHandler.log(
181
+ consoleLog(
182
182
  `Program ${ix.programId}, data len: ${ix.data.length}, LUT accounts data: ${ix.keys.filter((x) => lutAccounts.includes(x.pubkey)).length * 3}`
183
183
  );
184
184
  if (accountsNotInLut.length > 0) {
185
- this.txHandler.log(`${accountsNotInLut.length} accounts not in LUT:`);
185
+ consoleLog(`${accountsNotInLut.length} accounts not in LUT:`);
186
186
  for (const key of accountsNotInLut) {
187
- this.txHandler.log(key.toString());
187
+ consoleLog(key.toString());
188
188
  }
189
189
  }
190
190
  }
@@ -236,7 +236,7 @@ export class TransactionsManager<T extends TxHandler> {
236
236
  await item.initialize();
237
237
  }
238
238
  }
239
- this.txHandler.log("Transaction items:", items.length);
239
+ consoleLog("Transaction items:", items.length);
240
240
  return await this.assembleTransactionSets(items);
241
241
  }, this.totalRetries);
242
242
 
@@ -247,7 +247,7 @@ export class TransactionsManager<T extends TxHandler> {
247
247
  attemptNum: 0,
248
248
  }
249
249
  );
250
- this.txHandler.log("Initial item sets:", itemSets.length);
250
+ consoleLog("Initial item sets:", itemSets.length);
251
251
 
252
252
  if (this.atomically) {
253
253
  await this.processTransactionsAtomically(itemSets);
@@ -288,17 +288,6 @@ export class TransactionsManager<T extends TxHandler> {
288
288
  return true;
289
289
  }
290
290
 
291
- private getTrueAttemptNum(itemSetName: string) {
292
- const prevAttempts = this.statuses.filter(
293
- (x) => x.name === itemSetName && x.status !== TransactionStatus.Queued
294
- );
295
- const attemptNum =
296
- prevAttempts.length -
297
- prevAttempts.filter((x) => x.status === TransactionStatus.Skipped)
298
- ?.length;
299
- return attemptNum;
300
- }
301
-
302
291
  private async refreshItemSets(
303
292
  itemSets: TransactionSet[],
304
293
  attemptNum: number,
@@ -351,7 +340,7 @@ export class TransactionsManager<T extends TxHandler> {
351
340
 
352
341
  private async processTransactionsAtomically(itemSets: TransactionSet[]) {
353
342
  await retryWithExponentialBackoff(
354
- async (retryNum, prevError) => {
343
+ async (attemptNum, prevError) => {
355
344
  if (
356
345
  prevError &&
357
346
  this.statuses.filter((x) => x.simulationSuccessful).length >
@@ -360,16 +349,12 @@ export class TransactionsManager<T extends TxHandler> {
360
349
  throw prevError;
361
350
  }
362
351
 
363
- const attemptNum = Math.max(
364
- ...itemSets.map((x) => this.getTrueAttemptNum(x?.name() ?? ""))
365
- );
366
-
367
352
  this.priorityFeeSetting = this.getUpdatedPriorityFeeSetting(
368
353
  prevError,
369
354
  attemptNum
370
355
  );
371
356
 
372
- if (retryNum > 0) {
357
+ if (attemptNum > 0) {
373
358
  const refreshedSets = await this.refreshItemSets(
374
359
  itemSets,
375
360
  attemptNum,
@@ -474,7 +459,7 @@ export class TransactionsManager<T extends TxHandler> {
474
459
  ) {
475
460
  let itemSet: TransactionSet | undefined = itemSets[currentIndex];
476
461
  await retryWithExponentialBackoff(
477
- async (retryNum, prevError) => {
462
+ async (attemptNum, prevError) => {
478
463
  if (
479
464
  prevError &&
480
465
  this.statuses.filter((x) => x.simulationSuccessful).length >
@@ -483,8 +468,7 @@ export class TransactionsManager<T extends TxHandler> {
483
468
  throw prevError;
484
469
  }
485
470
 
486
- const attemptNum = this.getTrueAttemptNum(itemSet?.name() ?? "");
487
- if (currentIndex > 0 || retryNum > 0) {
471
+ if (currentIndex > 0 || attemptNum > 0) {
488
472
  const refreshedSets = await this.refreshItemSets(
489
473
  itemSets,
490
474
  attemptNum,
@@ -572,7 +556,7 @@ export class TransactionsManager<T extends TxHandler> {
572
556
  attemptNum: number,
573
557
  error: any
574
558
  ) {
575
- this.txHandler.log("Capturing error info...");
559
+ consoleLog("Capturing error info...");
576
560
  const errorDetails = getErrorInfo(
577
561
  this.txHandler.umi,
578
562
  transactions,
@@ -24,7 +24,6 @@ async function hasTokenAccounts(wallet: PublicKey) {
24
24
  )
25
25
  );
26
26
  for (let i = 0; i < tokenAccounts.length; i++) {
27
- console.log(tokenAccounts[i].publicKey.toString());
28
27
  if (!tokenAccounts[i].exists) {
29
28
  console.log(
30
29
  `Missing ${wallet.toString()} TA for `,
@@ -55,7 +54,9 @@ describe("Assert Solauto fee token accounts are created", async () => {
55
54
  !ismAccounts.find((x) => group.equals(toWeb3JsPublicKey(x.group)))
56
55
  );
57
56
 
58
- console.log("Missing ISM accounts", missingIsmAccounts);
57
+ if (missingIsmAccounts.length > 0) {
58
+ console.log("Missing ISM accounts", missingIsmAccounts);
59
+ }
59
60
  assert(missingIsmAccounts.length === 0);
60
61
  });
61
62
  });