@haven-fi/solauto-sdk 1.0.807 → 1.0.808

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":"switchboardUtils.d.ts","sourceRoot":"","sources":["../../src/utils/switchboardUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAGV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAsB,MAAM,0BAA0B,CAAC;AAGtE,OAAO,EACL,QAAQ,EAGT,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AASjD,wBAAsB,WAAW,CAC/B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,SAAS,EACf,MAAM,CAAC,EAAE,SAAS;;;GAiCnB;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAmD5C;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,SAAS,EAAE,GACjB,OAAO,CAAC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,EAAE,CAAC,CAuB/D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,WAEzD"}
1
+ {"version":3,"file":"switchboardUtils.d.ts","sourceRoot":"","sources":["../../src/utils/switchboardUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAGV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAsB,MAAM,0BAA0B,CAAC;AAGtE,OAAO,EACL,QAAQ,EAGT,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AASjD,wBAAsB,WAAW,CAC/B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,SAAS,EACf,MAAM,CAAC,EAAE,SAAS;;;GAiCnB;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAsD5C;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,SAAS,EAAE,GACjB,OAAO,CAAC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,EAAE,CAAC,CAuB/D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,WAEzD"}
@@ -41,7 +41,7 @@ async function buildSwbSubmitResponseTx(conn, signer, mint) {
41
41
  gateway: gateway.endpoint(),
42
42
  chain: "solana",
43
43
  network: "mainnet-beta",
44
- });
44
+ }, true);
45
45
  if (!res[1] || !res[1][0].value) {
46
46
  throw new Error("Unable to fetch Switchboard pull IX");
47
47
  }
@@ -32,7 +32,7 @@ import {
32
32
  import { getSecretKey } from "./shared";
33
33
  import { NATIVE_MINT } from "@solana/spl-token";
34
34
 
35
- const payForTransaction = false;
35
+ const payForTransaction = true;
36
36
  const testProgram = false;
37
37
  const lpEnv: ProgramEnv = "Prod";
38
38
 
@@ -64,17 +64,17 @@ export async function main() {
64
64
  // lpPoolAccount: getMarginfiAccounts("Prod").defaultGroup,
65
65
  });
66
66
 
67
- const transactionItems = [
68
- rebalance(client, 3000),
69
- ];
70
67
  // const transactionItems = [
71
- // new TransactionItem(
72
- // async () => await buildSwbSubmitResponseTx(conn, signer, new PublicKey(NATIVE_MINT)),
73
- // // async () => await buildSwbSubmitResponseTx(conn, signer, new PublicKey(JUP_SOL)),
74
- // // async () => await buildSwbSubmitResponseTx(conn, signer, new PublicKey(JITO_SOL))
75
- // // async () => await buildSwbSubmitResponseTx(conn, signer, new PublicKey(H_SOL))
76
- // ),
68
+ // rebalance(client, 3000),
77
69
  // ];
70
+ const transactionItems = [
71
+ new TransactionItem(
72
+ async () => await buildSwbSubmitResponseTx(conn, signer, new PublicKey(NATIVE_MINT)),
73
+ // async () => await buildSwbSubmitResponseTx(conn, signer, new PublicKey(JUP_SOL)),
74
+ // async () => await buildSwbSubmitResponseTx(conn, signer, new PublicKey(JITO_SOL))
75
+ // async () => await buildSwbSubmitResponseTx(conn, signer, new PublicKey(H_SOL))
76
+ ),
77
+ ];
78
78
 
79
79
  const txManager = new ClientTransactionsManager({
80
80
  txHandler: client,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.807",
3
+ "version": "1.0.808",
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",
@@ -77,11 +77,14 @@ export async function buildSwbSubmitResponseTx(
77
77
  consoleLog("Fetching crank IX...");
78
78
  const [pullIxs, responses] = await retryWithExponentialBackoff(
79
79
  async () => {
80
- const res = await feed.fetchUpdateIx({
81
- gateway: gateway.endpoint(),
82
- chain: "solana",
83
- network: "mainnet-beta",
84
- });
80
+ const res = await feed.fetchUpdateIx(
81
+ {
82
+ gateway: gateway.endpoint(),
83
+ chain: "solana",
84
+ network: "mainnet-beta",
85
+ },
86
+ true
87
+ );
85
88
  if (!res[1] || !res[1][0].value) {
86
89
  throw new Error("Unable to fetch Switchboard pull IX");
87
90
  }