@haven-fi/solauto-sdk 1.0.21 → 1.0.23

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"solautoClient.d.ts","sourceRoot":"","sources":["../../src/clients/solautoClient.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAC;AACxC,OAAO,EAEL,UAAU,EACV,SAAS,EACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,MAAM,EACN,kBAAkB,EAClB,GAAG,EAQJ,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,aAAa,EAEd,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,wBAAwB,EACxB,yBAAyB,EACzB,gCAAgC,EAChC,sBAAsB,EASvB,MAAM,cAAc,CAAC;AAOtB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAKvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAInE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,aAAa,CAAC;IAEvB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,oBAAoB,CAAC,EAAE,SAAS,CAAC;IACjC,mBAAmB,CAAC,EAAE,SAAS,CAAC;CACjC;AAED,8BAAsB,aAAa;IAwC/B,OAAO,CAAC,YAAY;IACb,SAAS,CAAC;IAxCZ,GAAG,EAAG,GAAG,CAAC;IACV,UAAU,EAAG,UAAU,CAAC;IACxB,eAAe,EAAG,eAAe,CAAC;IAElC,SAAS,EAAG,SAAS,CAAC;IACtB,MAAM,EAAG,MAA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AAO,IAAI,kBAAkB;IAEtC,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,kBAAkB;IAuFhE,QAAQ,CAAC,WAAW,CAClB,gBAAgB,EAAE,gBAAgB,EAClC,uBAAuB,EAAE,SAAS,GACjC,kBAAkB;IAErB,QAAQ,CAAC,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,kBAAkB;IAE3E,QAAQ,CAAC,SAAS,CAChB,aAAa,EAAE,GAAG,GAAG,GAAG,EACxB,WAAW,EAAE,cAAc,EAC3B,aAAa,EAAE,wBAAwB,EACvC,2BAA2B,CAAC,EAAE,MAAM,EACpC,WAAW,CAAC,EAAE,MAAM,GACnB,kBAAkB;IAEf,qBAAqB,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;CAYlE"}
@@ -147,6 +147,7 @@ class SolautoClient {
147
147
  async updateLookupTable() {
148
148
  const existingLutAccounts = await this.fetchExistingAuthorityLutAccounts();
149
149
  if (this.lutAccountsToAdd().every((element) => existingLutAccounts
150
+ .filter((x) => x !== undefined)
150
151
  .map((x) => x.toString().toLowerCase())
151
152
  .includes(element.toString().toLowerCase()))) {
152
153
  return undefined;
@@ -163,6 +164,7 @@ class SolautoClient {
163
164
  tx = tx.add((0, solanaUtils_1.getWrappedInstruction)(this.signer, createLookupTableInst));
164
165
  }
165
166
  const accountsToAdd = this.lutAccountsToAdd().filter((x) => !existingLutAccounts
167
+ .filter((x) => x !== undefined)
166
168
  .map((x) => x.toString().toLowerCase())
167
169
  .includes(x.toString().toLowerCase()));
168
170
  this.upToDateLutAccounts = [...existingLutAccounts, ...accountsToAdd];
@@ -1 +1 @@
1
- {"version":3,"file":"solanaUtils.d.ts","sourceRoot":"","sources":["../../src/utils/solanaUtils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,uBAAuB,EACvB,MAAM,EACN,kBAAkB,EAClB,GAAG,EACH,kBAAkB,EAGnB,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAGL,UAAU,EAC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GACnB,kBAAkB,CAKpB;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,GACb,kBAAkB,CAKpB;AAED,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,GAAG,EACR,oBAAoB,EAAE,MAAM,EAAE,GAC7B,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAkBpC;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,kBAAkB,EACtB,gBAAgB,EAAE,MAAM,EACxB,gBAAgB,CAAC,EAAE,MAAM,sBA4D1B;AAkBD,wBAAsB,2BAA2B,CAC/C,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,kBAAkB,EACtB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAgBjB;AAED,wBAAsB,8BAA8B,CAClD,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,kBAAkB,EACtB,YAAY,CAAC,EAAE,OAAO,EACtB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAmDjC"}
@@ -136,7 +136,9 @@ async function getComputeUnitPriceEstimate(umi, tx, attemptNum) {
136
136
  const resp = await umi.rpc.call("getPriorityFeeEstimate", [
137
137
  {
138
138
  transaction: serializedTransaction,
139
- options: { priorityLevel: attemptNum && attemptNum > 0 ? "VeryHigh" : "High" },
139
+ options: {
140
+ priorityLevel: attemptNum && attemptNum > 0 ? "VeryHigh" : "High",
141
+ },
140
142
  },
141
143
  ]);
142
144
  const feeEstimate = Math.round(resp.priorityFeeEstimate);
@@ -153,13 +155,13 @@ async function sendSingleOptimizedTransaction(umi, connection, tx, simulateOnly,
153
155
  const computeUnitLimit = Math.round(simulationResult.value.unitsConsumed * 1.1);
154
156
  console.log("Compute unit limit: ", computeUnitLimit);
155
157
  if (!simulateOnly) {
156
- const result = await (0, generalUtils_1.retryWithExponentialBackoff)(async () => await assembleFinalTransaction(umi.identity, tx, feeEstimate, computeUnitLimit).sendAndConfirm(umi, {
158
+ const result = await assembleFinalTransaction(umi.identity, tx, feeEstimate, computeUnitLimit).sendAndConfirm(umi, {
157
159
  send: {
158
160
  skipPreflight: true,
159
161
  commitment: "finalized",
160
162
  },
161
163
  confirm: { commitment: "finalized" },
162
- }));
164
+ });
163
165
  console.log(`https://solscan.io/tx/${bs58_1.default.encode(result.signature)}`);
164
166
  if (result.result.value.err !== null) {
165
167
  throw new Error(result.result.value.err.toString());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
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",
@@ -310,6 +310,7 @@ export abstract class SolautoClient {
310
310
  if (
311
311
  this.lutAccountsToAdd().every((element) =>
312
312
  existingLutAccounts
313
+ .filter((x) => x !== undefined)
313
314
  .map((x) => x.toString().toLowerCase())
314
315
  .includes(element.toString().toLowerCase())
315
316
  )
@@ -334,6 +335,7 @@ export abstract class SolautoClient {
334
335
  const accountsToAdd: PublicKey[] = this.lutAccountsToAdd().filter(
335
336
  (x) =>
336
337
  !existingLutAccounts
338
+ .filter((x) => x !== undefined)
337
339
  .map((x) => x.toString().toLowerCase())
338
340
  .includes(x.toString().toLowerCase())
339
341
  );
@@ -253,7 +253,9 @@ export async function getComputeUnitPriceEstimate(
253
253
  const resp = await umi.rpc.call("getPriorityFeeEstimate", [
254
254
  {
255
255
  transaction: serializedTransaction,
256
- options: { priorityLevel: attemptNum && attemptNum > 0 ? "VeryHigh" : "High" },
256
+ options: {
257
+ priorityLevel: attemptNum && attemptNum > 0 ? "VeryHigh" : "High",
258
+ },
257
259
  },
258
260
  ]);
259
261
  const feeEstimate = Math.round((resp as any).priorityFeeEstimate as number);
@@ -298,21 +300,18 @@ export async function sendSingleOptimizedTransaction(
298
300
  console.log("Compute unit limit: ", computeUnitLimit);
299
301
 
300
302
  if (!simulateOnly) {
301
- const result = await retryWithExponentialBackoff(
302
- async () =>
303
- await assembleFinalTransaction(
304
- umi.identity,
305
- tx,
306
- feeEstimate,
307
- computeUnitLimit
308
- ).sendAndConfirm(umi, {
309
- send: {
310
- skipPreflight: true,
311
- commitment: "finalized",
312
- },
313
- confirm: { commitment: "finalized" },
314
- })
315
- );
303
+ const result = await assembleFinalTransaction(
304
+ umi.identity,
305
+ tx,
306
+ feeEstimate,
307
+ computeUnitLimit
308
+ ).sendAndConfirm(umi, {
309
+ send: {
310
+ skipPreflight: true,
311
+ commitment: "finalized",
312
+ },
313
+ confirm: { commitment: "finalized" },
314
+ });
316
315
  console.log(`https://solscan.io/tx/${bs58.encode(result.signature)}`);
317
316
  if (result.result.value.err !== null) {
318
317
  throw new Error(result.result.value.err.toString());
@@ -3,8 +3,8 @@ import { PublicKey } from "@solana/web3.js";
3
3
  import { NATIVE_MINT } from "@solana/spl-token";
4
4
  import { assert } from "chai";
5
5
  import {
6
+ newSolautoMarginfiPositionArgs,
6
7
  SolautoMarginfiClient,
7
- newMarginfiSolautoManagedPositionArgs,
8
8
  } from "../../src/clients/solautoMarginfiClient";
9
9
  import { setupTest } from "../shared";
10
10
  import { MARGINFI_ACCOUNTS } from "../../src/constants/marginfiAccounts";
@@ -94,7 +94,7 @@ async function getFakePosition(
94
94
  ): Promise<SolautoClient> {
95
95
  const client = new SolautoMarginfiClient(process.env.HELIUS_API_KEY ?? "", true);
96
96
  await client.initialize(
97
- newMarginfiSolautoManagedPositionArgs(
97
+ newSolautoMarginfiPositionArgs(
98
98
  1,
99
99
  signer,
100
100
  undefined,
@@ -270,7 +270,7 @@ describe("Rebalance tests", async () => {
270
270
  it("Standard rebalance with target rate", async () => {
271
271
  const client = new SolautoMarginfiClient(process.env.HELIUS_API_KEY ?? "", true);
272
272
  await client.initialize(
273
- newMarginfiSolautoManagedPositionArgs(
273
+ newSolautoMarginfiPositionArgs(
274
274
  1,
275
275
  signer,
276
276
  undefined,