@haven-fi/solauto-sdk 1.0.22 → 1.0.24
Sign up to get free protection for your applications and to get access to all the features.
@@ -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,EACV,SAAS,EAIT,sBAAsB,EAEvB,MAAM,iBAAiB,CAAC;AAazB,wBAAsB,wBAAwB,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAQxE;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,sBAAsB,GACzB,kBAAkB,CAMpB;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,GACtB,kBAAkB,CAOpB;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,kBAAkB,CAOpB;AAED,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,SAAS,GACd,kBAAkB,CAUpB;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,SAAS,EACtB,QAAQ,EAAE,MAAM,GACf,kBAAkB,CASpB;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,SAAS,EACvB,SAAS,EAAE,SAAS,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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,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;AAmBD,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"}
|
@@ -121,6 +121,7 @@ exports.assembleFinalTransaction = assembleFinalTransaction;
|
|
121
121
|
async function simulateTransaction(connection, transaction) {
|
122
122
|
const simulationResult = await connection.simulateTransaction(transaction, {
|
123
123
|
sigVerify: false,
|
124
|
+
commitment: "processed"
|
124
125
|
});
|
125
126
|
if (simulationResult.value.err) {
|
126
127
|
simulationResult.value.logs?.forEach((x) => {
|
package/package.json
CHANGED
package/src/utils/solanaUtils.ts
CHANGED
@@ -231,6 +231,7 @@ async function simulateTransaction(
|
|
231
231
|
): Promise<RpcResponseAndContext<SimulatedTransactionResponse>> {
|
232
232
|
const simulationResult = await connection.simulateTransaction(transaction, {
|
233
233
|
sigVerify: false,
|
234
|
+
commitment: "processed"
|
234
235
|
});
|
235
236
|
if (simulationResult.value.err) {
|
236
237
|
simulationResult.value.logs?.forEach((x: any) => {
|
@@ -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
|
-
|
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
|
-
|
273
|
+
newSolautoMarginfiPositionArgs(
|
274
274
|
1,
|
275
275
|
signer,
|
276
276
|
undefined,
|