@haven-fi/solauto-sdk 1.0.796 → 1.0.797

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 +1 @@
1
- {"version":3,"file":"clientTransactionsManager.d.ts","sourceRoot":"","sources":["../../../../src/services/transactions/manager/clientTransactionsManager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAO5D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3C,qBAAa,yBAA0B,SAAQ,mBAAmB,CAAC,aAAa,CAAC;YACjE,SAAS;YAmBT,mBAAmB;YAuCnB,WAAW;IA4CZ,IAAI,CAAC,YAAY,EAAE,eAAe,EAAE;CAmClD"}
1
+ {"version":3,"file":"clientTransactionsManager.d.ts","sourceRoot":"","sources":["../../../../src/services/transactions/manager/clientTransactionsManager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAO5D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3C,qBAAa,yBAA0B,SAAQ,mBAAmB,CAAC,aAAa,CAAC;YACjE,SAAS;YAmBT,mBAAmB;YAwCnB,WAAW;IA4CZ,IAAI,CAAC,YAAY,EAAE,eAAe,EAAE;CAmClD"}
@@ -29,6 +29,7 @@ class ClientTransactionsManager extends transactionsManager_1.TransactionsManage
29
29
  if (staleOracles) {
30
30
  this.txHandler.log("Requires oracle update(s)...");
31
31
  const oracleTxs = switchboardMints.map((x) => new types_1.TransactionItem(async () => await (0, utils_1.buildSwbSubmitResponseTx)(this.txHandler.connection, this.txHandler.signer, x), this.updateOracleTxName));
32
+ this.txHandler.log("Set crank IXs in TX");
32
33
  txs.unshift(...oracleTxs);
33
34
  }
34
35
  }
@@ -12,6 +12,7 @@ import {
12
12
  getPositionExBulk,
13
13
  getSolanaRpcConnection,
14
14
  getSolautoManagedPositions,
15
+ JITO_SOL,
15
16
  LendingPlatform,
16
17
  LOCAL_IRONFORGE_API_URL,
17
18
  openSolautoPosition,
@@ -53,28 +54,29 @@ export async function main() {
53
54
  lpEnv,
54
55
  });
55
56
 
56
- await client.initializeNewSolautoPosition({
57
+ await client.initializeExistingSolautoPosition({
57
58
  positionId: 1,
58
- supplyMint: NATIVE_MINT,
59
- debtMint: new PublicKey(USDC),
60
- lpPoolAccount: getMarginfiAccounts("Prod").defaultGroup,
59
+ authority: new PublicKey("EvAzkzFa7bu4vWpgu8Wyng8LLeCNmteP8jDme5gWSQWL")
60
+ // supplyMint: NATIVE_MINT,
61
+ // debtMint: new PublicKey(USDC),
62
+ // lpPoolAccount: getMarginfiAccounts("Prod").defaultGroup,
61
63
  });
62
64
 
63
- const transactionItems = [
64
- openSolautoPosition(client, {
65
- boostToBps: 2000,
66
- boostGap: 50,
67
- repayToBps: 5000,
68
- repayGap: 50,
69
- }),
70
- deposit(client, toBaseUnit(0.5, 9)),
71
- rebalance(client),
72
- ];
73
65
  // const transactionItems = [
74
- // new TransactionItem(
75
- // async () => await buildSwbSubmitResponseTx(conn, signer, NATIVE_MINT)
76
- // ),
66
+ // openSolautoPosition(client, {
67
+ // boostToBps: 2000,
68
+ // boostGap: 50,
69
+ // repayToBps: 5000,
70
+ // repayGap: 50,
71
+ // }),
72
+ // deposit(client, toBaseUnit(0.5, 9)),
73
+ // rebalance(client),
77
74
  // ];
75
+ const transactionItems = [
76
+ new TransactionItem(
77
+ async () => await buildSwbSubmitResponseTx(conn, signer, new PublicKey(JITO_SOL))
78
+ ),
79
+ ];
78
80
 
79
81
  const txManager = new ClientTransactionsManager({
80
82
  txHandler: client,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.796",
3
+ "version": "1.0.797",
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",
@@ -68,6 +68,7 @@ export class ClientTransactionsManager extends TransactionsManager<SolautoClient
68
68
  this.updateOracleTxName
69
69
  )
70
70
  );
71
+ this.txHandler.log("Set crank IXs in TX");
71
72
  txs.unshift(...oracleTxs);
72
73
  }
73
74
  }