@hawksightco/hawk-sdk 1.1.10 → 1.1.12

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.
@@ -2,13 +2,14 @@
2
2
  import * as web3 from '@solana/web3.js';
3
3
  import { DummySigners, TransactionBatchExecute } from "./TransactionBatchExecute";
4
4
  import { SimpleIxGenerator } from './SimpleIxGenerator';
5
+ import { JupiterAlts } from './JupiterAlts';
5
6
  export declare class Atomicity extends TransactionBatchExecute {
6
7
  private ixGenerator;
7
8
  /**
8
9
  * User wallet
9
10
  */
10
11
  private userWallet?;
11
- constructor(lookupTableAddresses: web3.PublicKey[], instructions: web3.TransactionInstruction[], payer: web3.Keypair, connection: web3.Connection, signers: web3.Keypair[] | undefined, ixGenerator: SimpleIxGenerator);
12
+ constructor(lookupTableAddresses: web3.PublicKey[], instructions: web3.TransactionInstruction[], payer: web3.Keypair, connection: web3.Connection, signers: web3.Keypair[] | undefined, jupiterAlts: JupiterAlts, ixGenerator: SimpleIxGenerator);
12
13
  /**
13
14
  * Set user wallet
14
15
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Atomicity.d.ts","sourceRoot":"","sources":["../../../src/classes/Atomicity.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,qBAAa,SAAU,SAAQ,uBAAuB;IAalD,OAAO,CAAC,WAAW;IAXrB;;OAEG;IACH,OAAO,CAAC,UAAU,CAAC,CAAiB;gBAGlC,oBAAoB,EAAE,IAAI,CAAC,SAAS,EAAE,EACtC,YAAY,EAAE,IAAI,CAAC,sBAAsB,EAAE,EAC3C,KAAK,EAAE,IAAI,CAAC,OAAO,EACnB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,OAAO,4BAAqB,EACp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AAC,aAAa,EAAE,IAAI,CAAC,sBAAsB,EAAE,EAAE,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,CAAC;CAiDxJ"}
@@ -13,8 +13,8 @@ exports.Atomicity = void 0;
13
13
  const TransactionBatchExecute_1 = require("./TransactionBatchExecute");
14
14
  const functions_1 = require("../functions");
15
15
  class Atomicity extends TransactionBatchExecute_1.TransactionBatchExecute {
16
- constructor(lookupTableAddresses, instructions, payer, connection, signers = [], ixGenerator) {
17
- super(lookupTableAddresses, instructions, payer, connection, signers);
16
+ constructor(lookupTableAddresses, instructions, payer, connection, signers = [], jupiterAlts, ixGenerator) {
17
+ super(lookupTableAddresses, instructions, payer, connection, signers, jupiterAlts);
18
18
  this.ixGenerator = ixGenerator;
19
19
  }
20
20
  /**
@@ -78,9 +78,9 @@ class Atomicity extends TransactionBatchExecute_1.TransactionBatchExecute {
78
78
  throw new Error(`Atomicity.userWallet is not set`);
79
79
  }
80
80
  // Generate set transaction slot instruction
81
- const setTransactionSlotIx = yield this.ixGenerator.setTransactionSlot(this.connection, { userWallet: this.userWallet });
81
+ const setTransactionSlotIx = yield this.ixGenerator.iyfMain.setTransactionSlot(this.connection, { userWallet: this.userWallet });
82
82
  // Generate verify transaction slot instruction
83
- const verifyTransactionSlotIx = yield this.ixGenerator.verifyTransactionSlot(this.connection, { userWallet: this.userWallet });
83
+ const verifyTransactionSlotIx = yield this.ixGenerator.iyfMain.verifyTransactionSlot(this.connection, { userWallet: this.userWallet });
84
84
  // Run simulation
85
85
  let batch = [];
86
86
  let result = [];
@@ -10,6 +10,7 @@ import { HawkApiOptions } from "../types";
10
10
  import { SimpleIxGenerator } from "./SimpleIxGenerator";
11
11
  import { TransactionBatchExecute, TransactionBatchExecuteParams } from "./TransactionBatchExecute";
12
12
  import { Atomicity } from "./Atomicity";
13
+ import { JupiterAlts } from "./JupiterAlts";
13
14
  /**
14
15
  * HawkAPI is a central gateway class that aggregates access to various functional modules
15
16
  * for interacting with HawkSight's blockchain APIs. This class initializes and exposes modules
@@ -40,7 +41,9 @@ export declare class HawkAPI {
40
41
  /** Search module (token search only for now...) */
41
42
  readonly search: Search;
42
43
  /** Simple instruction generator */
43
- readonly simpleIxGenerator: SimpleIxGenerator;
44
+ readonly ix: SimpleIxGenerator;
45
+ /** Jupiter alts */
46
+ readonly jupAlts: JupiterAlts;
44
47
  /**
45
48
  * Initializes a new instance of the HawkAPI class with a specified API URL.
46
49
  * @param url The base URL for the HawkSight API services, defaulted to "https://api2.hawksight.co" if not specified.
@@ -1 +1 @@
1
- {"version":3,"file":"HawkAPI.d.ts","sourceRoot":"","sources":["../../../src/classes/HawkAPI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;GAQG;AACH,qBAAa,OAAO;IAkChB,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM;IAC9B,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC;IAlC7B,+BAA+B;IAC/B,OAAO,CAAC,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,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,KAAK,WAAW;IAI9F;;;;OAIG;IACH,YAAY,CAAC,EAAC,oBAAoB,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAC,EAAE,6BAA6B;IAW5G;;;;OAIG;IACH,SAAS,CAAC,EAAC,oBAAoB,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAC,EAAE,6BAA6B;CAW1G"}
@@ -13,6 +13,7 @@ const CreateTxMetadata_1 = require("./CreateTxMetadata");
13
13
  const SimpleIxGenerator_1 = require("./SimpleIxGenerator");
14
14
  const TransactionBatchExecute_1 = require("./TransactionBatchExecute");
15
15
  const Atomicity_1 = require("./Atomicity");
16
+ const JupiterAlts_1 = require("./JupiterAlts");
16
17
  /**
17
18
  * HawkAPI is a central gateway class that aggregates access to various functional modules
18
19
  * for interacting with HawkSight's blockchain APIs. This class initializes and exposes modules
@@ -40,7 +41,8 @@ class HawkAPI {
40
41
  this._txGenerator = new TxGenerator_1.TxGenerator(client, this.generalUtility);
41
42
  this.txGeneratorAutomation = new TxGeneratorAutomations_1.TxGeneratorAutomations(client, this.generalUtility);
42
43
  this.search = new Search_1.Search(url);
43
- this.simpleIxGenerator = new SimpleIxGenerator_1.SimpleIxGenerator();
44
+ this.ix = new SimpleIxGenerator_1.SimpleIxGenerator();
45
+ this.jupAlts = new JupiterAlts_1.JupiterAlts();
44
46
  // Load create tx metadata module
45
47
  if (this.options === undefined || !this.options.disableTxMetadataLoad) {
46
48
  CreateTxMetadata_1.CreateTxMetadata.instance().load();
@@ -64,7 +66,7 @@ class HawkAPI {
64
66
  * @param param
65
67
  */
66
68
  batchExecute({ lookupTableAddresses, instructions, payer, connection, signers }) {
67
- return new TransactionBatchExecute_1.TransactionBatchExecute(lookupTableAddresses, instructions, payer, connection, signers);
69
+ return new TransactionBatchExecute_1.TransactionBatchExecute(lookupTableAddresses, instructions, payer, connection, signers, this.jupAlts);
68
70
  }
69
71
  /**
70
72
  * Create instance of Atomicity class
@@ -72,7 +74,7 @@ class HawkAPI {
72
74
  * @param param
73
75
  */
74
76
  atomicity({ lookupTableAddresses, instructions, payer, connection, signers }) {
75
- return new Atomicity_1.Atomicity(lookupTableAddresses, instructions, payer, connection, signers, this.simpleIxGenerator);
77
+ return new Atomicity_1.Atomicity(lookupTableAddresses, instructions, payer, connection, signers, this.jupAlts, this.ix);
76
78
  }
77
79
  }
78
80
  exports.HawkAPI = HawkAPI;
@@ -1,3 +1,38 @@
1
+ /// <reference types="@meteora-ag/dlmm/node_modules/@solana/web3.js" />
2
+ import * as web3 from "@solana/web3.js";
3
+ export type Alts = Record<string, string>;
1
4
  export declare class JupiterAlts {
5
+ private username?;
6
+ private password?;
7
+ private hash?;
8
+ private url?;
9
+ private _alts;
10
+ /**
11
+ * Return jupiter alts object
12
+ */
13
+ get alts(): Alts;
14
+ /**
15
+ * Set API URL
16
+ */
17
+ setApiUrl(url: string): void;
18
+ /**
19
+ * Find address lookup table from given public keys
20
+ *
21
+ * @param pubkeys
22
+ */
23
+ findAltByPubkeys(pubkeys: web3.PublicKey[]): web3.PublicKey[];
24
+ /**
25
+ * Set server credentials
26
+ *
27
+ * @param username
28
+ * @param password
29
+ */
30
+ setCredentials(username: string, password: string): void;
31
+ /**
32
+ * Download jupiter alts from endpoint
33
+ *
34
+ * @returns
35
+ */
36
+ downloadAlts(): Promise<void>;
2
37
  }
3
38
  //# sourceMappingURL=JupiterAlts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"JupiterAlts.d.ts","sourceRoot":"","sources":["../../../src/classes/JupiterAlts.ts"],"names":[],"mappings":"AAAA,qBAAa,WAAW;CAEvB"}
1
+ {"version":3,"file":"JupiterAlts.d.ts","sourceRoot":"","sources":["../../../src/classes/JupiterAlts.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE1C,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,IAAI,CAAC,CAAS;IACtB,OAAO,CAAC,GAAG,CAAC,CAAS;IACrB,OAAO,CAAC,KAAK,CAAY;IAEzB;;OAEG;IACH,IAAI,IAAI,IAAI,IAAI,CAEf;IAED;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM;IAIrB;;;;OAIG;IACH,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE;IAW7D;;;;;OAKG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAKjD;;;;OAIG;IACG,YAAY;CAsBnB"}
@@ -1,6 +1,104 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
2
34
  Object.defineProperty(exports, "__esModule", { value: true });
3
35
  exports.JupiterAlts = void 0;
36
+ const web3 = __importStar(require("@solana/web3.js"));
4
37
  class JupiterAlts {
38
+ constructor() {
39
+ this._alts = {};
40
+ }
41
+ /**
42
+ * Return jupiter alts object
43
+ */
44
+ get alts() {
45
+ return this._alts;
46
+ }
47
+ /**
48
+ * Set API URL
49
+ */
50
+ setApiUrl(url) {
51
+ this.url = url;
52
+ }
53
+ /**
54
+ * Find address lookup table from given public keys
55
+ *
56
+ * @param pubkeys
57
+ */
58
+ findAltByPubkeys(pubkeys) {
59
+ const alts = [];
60
+ for (const pubkey of pubkeys) {
61
+ const alt = this._alts[pubkey.toBase58()];
62
+ if (alt !== undefined) {
63
+ alts.push(new web3.PublicKey(alt));
64
+ }
65
+ }
66
+ return alts;
67
+ }
68
+ /**
69
+ * Set server credentials
70
+ *
71
+ * @param username
72
+ * @param password
73
+ */
74
+ setCredentials(username, password) {
75
+ this.username = username;
76
+ this.password = password;
77
+ }
78
+ /**
79
+ * Download jupiter alts from endpoint
80
+ *
81
+ * @returns
82
+ */
83
+ downloadAlts() {
84
+ return __awaiter(this, void 0, void 0, function* () {
85
+ if (this.url === undefined) {
86
+ throw new Error('Please set endpoint URL via hawkAPI.jupAlts.setApiUrl first!');
87
+ }
88
+ if (this.username === undefined || this.password === undefined) {
89
+ throw new Error('Please set credentials via hawkAPI.jupAlts.setCredentials() first!');
90
+ }
91
+ const base64Credentials = btoa(`${this.username}:${this.password}`);
92
+ const hash = yield (yield fetch(this.url, { headers: { Authorization: `Basic ${base64Credentials}`, Range: 'bytes=9-72' } })).text();
93
+ // If hash matches, then no need to download the file.
94
+ if (this.hash === hash)
95
+ return;
96
+ // Otherwise, download the alts
97
+ const response = yield fetch(this.url, { headers: { Authorization: `Basic ${base64Credentials}` } });
98
+ const content = yield response.text();
99
+ const jsonString = content.slice(82, content.length - 1);
100
+ this._alts = JSON.parse(jsonString);
101
+ });
102
+ }
5
103
  }
6
104
  exports.JupiterAlts = JupiterAlts;
@@ -1,6 +1,5 @@
1
- /// <reference types="@meteora-ag/dlmm/node_modules/@solana/web3.js" />
2
- import * as web3 from "@solana/web3.js";
3
- import { AtomicityContextParams } from "../hawksight";
1
+ import { IyfMainIxGenerator } from "../ixGenerator/IyfMainIxGenerator";
2
+ import { MeteoraDlmmIxGenerator } from "../ixGenerator/MeteoraDlmmIxGenerator";
4
3
  /**
5
4
  * The SimpleIxGenerator class is a general-purpose utility for generating single
6
5
  * transaction instructions for simple tasks on the Solana blockchain. It offers
@@ -9,22 +8,12 @@ import { AtomicityContextParams } from "../hawksight";
9
8
  */
10
9
  export declare class SimpleIxGenerator {
11
10
  /**
12
- * Generates a transaction instruction that sets the current blockchain clock
13
- * to the user's PDA (Program Derived Address) account.
14
- *
15
- * @param connection - A Solana web3.js Connection object for interacting with the blockchain.
16
- * @param params - AtomicityContextParams containing the context and parameters for setting the transaction slot.
17
- * @returns A Promise that resolves to a TransactionInstruction object for setting the current clock in the PDA.
11
+ * IYF Main Instruction Generator
18
12
  */
19
- setTransactionSlot(connection: web3.Connection, params: AtomicityContextParams): Promise<web3.TransactionInstruction>;
13
+ iyfMain: IyfMainIxGenerator;
20
14
  /**
21
- * Generates a transaction instruction that verifies whether the current blockchain
22
- * clock matches the value that has been previously set in the user's PDA (Program Derived Address) account.
23
- *
24
- * @param connection - A Solana web3.js Connection object for interacting with the blockchain.
25
- * @param params - AtomicityContextParams containing the context and parameters for verifying the transaction slot.
26
- * @returns A Promise that resolves to a TransactionInstruction object for verifying the clock in the PDA.
15
+ * Meteora Ix Generator
27
16
  */
28
- verifyTransactionSlot(connection: web3.Connection, params: AtomicityContextParams): Promise<web3.TransactionInstruction>;
17
+ meteoraDlmm: MeteoraDlmmIxGenerator;
29
18
  }
30
19
  //# sourceMappingURL=SimpleIxGenerator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleIxGenerator.d.ts","sourceRoot":"","sources":["../../../src/classes/SimpleIxGenerator.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAGxC,OAAO,EAA6C,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEjG;;;;;GAKG;AACH,qBAAa,iBAAiB;IAE5B;;;;;;;OAOG;IACG,kBAAkB,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC;IAQ3H;;;;;;;OAOG;IACG,qBAAqB,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC;CAO/H"}
1
+ {"version":3,"file":"SimpleIxGenerator.d.ts","sourceRoot":"","sources":["../../../src/classes/SimpleIxGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E;;;;;GAKG;AACH,qBAAa,iBAAiB;IAE5B;;OAEG;IACI,OAAO,EAAE,kBAAkB,CAA4B;IAE9D;;OAEG;IACI,WAAW,EAAE,sBAAsB,CAA4C;CACvF"}
@@ -1,17 +1,8 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.SimpleIxGenerator = void 0;
13
- const anchor_1 = require("../anchor");
14
- const hawksight_1 = require("../hawksight");
4
+ const IyfMainIxGenerator_1 = require("../ixGenerator/IyfMainIxGenerator");
5
+ const MeteoraDlmmIxGenerator_1 = require("../ixGenerator/MeteoraDlmmIxGenerator");
15
6
  /**
16
7
  * The SimpleIxGenerator class is a general-purpose utility for generating single
17
8
  * transaction instructions for simple tasks on the Solana blockchain. It offers
@@ -19,37 +10,15 @@ const hawksight_1 = require("../hawksight");
19
10
  * interacting with the user's PDA (Program Derived Address) account.
20
11
  */
21
12
  class SimpleIxGenerator {
22
- /**
23
- * Generates a transaction instruction that sets the current blockchain clock
24
- * to the user's PDA (Program Derived Address) account.
25
- *
26
- * @param connection - A Solana web3.js Connection object for interacting with the blockchain.
27
- * @param params - AtomicityContextParams containing the context and parameters for setting the transaction slot.
28
- * @returns A Promise that resolves to a TransactionInstruction object for setting the current clock in the PDA.
29
- */
30
- setTransactionSlot(connection, params) {
31
- return __awaiter(this, void 0, void 0, function* () {
32
- // Initialize anchor
33
- anchor_1.Anchor.initialize(connection);
34
- // Get set transaction slot instruction
35
- return yield (0, hawksight_1.setTransactionSlot)(params);
36
- });
37
- }
38
- /**
39
- * Generates a transaction instruction that verifies whether the current blockchain
40
- * clock matches the value that has been previously set in the user's PDA (Program Derived Address) account.
41
- *
42
- * @param connection - A Solana web3.js Connection object for interacting with the blockchain.
43
- * @param params - AtomicityContextParams containing the context and parameters for verifying the transaction slot.
44
- * @returns A Promise that resolves to a TransactionInstruction object for verifying the clock in the PDA.
45
- */
46
- verifyTransactionSlot(connection, params) {
47
- return __awaiter(this, void 0, void 0, function* () {
48
- // Initialize anchor
49
- anchor_1.Anchor.initialize(connection);
50
- // Get verify transaction slot instruction
51
- return yield (0, hawksight_1.verifyTransactionSlot)(params);
52
- });
13
+ constructor() {
14
+ /**
15
+ * IYF Main Instruction Generator
16
+ */
17
+ this.iyfMain = new IyfMainIxGenerator_1.IyfMainIxGenerator();
18
+ /**
19
+ * Meteora Ix Generator
20
+ */
21
+ this.meteoraDlmm = new MeteoraDlmmIxGenerator_1.MeteoraDlmmIxGenerator(this.iyfMain);
53
22
  }
54
23
  }
55
24
  exports.SimpleIxGenerator = SimpleIxGenerator;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="@meteora-ag/dlmm/node_modules/@solana/web3.js" />
2
2
  import * as web3 from '@solana/web3.js';
3
+ import { JupiterAlts } from './JupiterAlts';
3
4
  /**
4
5
  * Dummy signers
5
6
  */
@@ -28,6 +29,7 @@ export declare class TransactionBatchExecute {
28
29
  protected payer: web3.Keypair;
29
30
  protected connection: web3.Connection;
30
31
  protected signers: web3.Keypair[];
32
+ protected jupiterAlts: JupiterAlts;
31
33
  protected readonly MAX_SIZE = 1232;
32
34
  /**
33
35
  * Downloaded address lookup table accounts
@@ -42,11 +44,24 @@ export declare class TransactionBatchExecute {
42
44
  * @param connection Connection to mainnet
43
45
  * @param signers Required signers to fulfill the transactions
44
46
  */
45
- constructor(lookupTableAddresses: web3.PublicKey[], instructions: web3.TransactionInstruction[], payer: web3.Keypair, connection: web3.Connection, signers?: web3.Keypair[]);
47
+ constructor(lookupTableAddresses: web3.PublicKey[], instructions: web3.TransactionInstruction[], payer: web3.Keypair, connection: web3.Connection, signers: web3.Keypair[], jupiterAlts: JupiterAlts);
46
48
  /**
47
49
  * Downoad address lookup table from given cluster
48
50
  */
49
51
  downloadAlts(): Promise<void>;
52
+ /**
53
+ * Get list of lookup tables to download
54
+ */
55
+ private getListOfAltsToDownload;
56
+ /**
57
+ * Filter lookup tables
58
+ */
59
+ private filterLookupTables;
60
+ /**
61
+ * Get public keys from instruction
62
+ * @returns
63
+ */
64
+ private getPubkeyFromInstruction;
50
65
  /**
51
66
  * Override signers (in case that signers are set to empty array)
52
67
  *
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionBatchExecute.d.ts","sourceRoot":"","sources":["../../../src/classes/TransactionBatchExecute.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,mBAAmB,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC;IACtC,YAAY,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC;IAC/B,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC;CACvB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,oBAAoB,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC;IACvC,YAAY,EAAE,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAC5C,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC;IACpB,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC;IAC5B,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;CACzB,CAAA;AAED;;GAEG;AACH,qBAAa,uBAAuB;IAmBhC,SAAS,CAAC,oBAAoB,EAAE,IAAI,CAAC,SAAS,EAAE;IAChD,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,sBAAsB,EAAE;IACrD,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO;IAC7B,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU;IACrC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;IArBnC,SAAS,CAAC,QAAQ,CAAC,QAAQ,QAAQ;I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wB,CAAC,eAAe,EAAE,IAAI,CAAC,8BAA8B,EAAE,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,EAAE,YAAY,EAAE,YAAY,GAAG,MAAM;IAclK;;;;;OAKG;IACH,OAAO,CAAC,4BAA4B;IAapC;;;;;OAKG;IACH,OAAO,CAAC,yBAAyB;IAajC;;;;;OAKG;IACH,OAAO,CAAC,0BAA0B;IAqBlC;;;;OAIG;IACH,OAAO,CAAC,wBAAwB;CA2BjC"}
@@ -47,12 +47,13 @@ class TransactionBatchExecute {
47
47
  * @param connection Connection to mainnet
48
48
  * @param signers Required signers to fulfill the transactions
49
49
  */
50
- constructor(lookupTableAddresses, instructions, payer, connection, signers = []) {
50
+ constructor(lookupTableAddresses, instructions, payer, connection, signers = [], jupiterAlts) {
51
51
  this.lookupTableAddresses = lookupTableAddresses;
52
52
  this.instructions = instructions;
53
53
  this.payer = payer;
54
54
  this.connection = connection;
55
55
  this.signers = signers;
56
+ this.jupiterAlts = jupiterAlts;
56
57
  this.MAX_SIZE = 1232;
57
58
  /**
58
59
  * Downloaded address lookup table accounts
@@ -65,11 +66,20 @@ class TransactionBatchExecute {
65
66
  */
66
67
  downloadAlts() {
67
68
  return __awaiter(this, void 0, void 0, function* () {
68
- // Skip if we already downloaded alts from the cluster
69
- if (this.alts.length > 0 && this.alts.length === this.lookupTableAddresses.length)
70
- return;
69
+ // Public keys across all instructions
70
+ const pubkeys = this.getPubkeyFromInstruction();
71
+ // Download jupiter alts first
72
+ yield this.jupiterAlts.downloadAlts();
73
+ // Then find alts from pubkeys
74
+ const jupAlts = this.jupiterAlts.findAltByPubkeys(pubkeys);
75
+ // Then append jupiter alts in the lookup table address
76
+ this.lookupTableAddresses.push(...jupAlts);
77
+ // Then make sure lookup table addresses are unique
78
+ this.filterLookupTables();
79
+ // Get list of lookup tables to download
80
+ const lookupTableAddresses = this.getListOfAltsToDownload();
71
81
  // Download if address lookup table does not match with downloaded alts
72
- for (const lookupTable of this.lookupTableAddresses) {
82
+ for (const lookupTable of lookupTableAddresses) {
73
83
  const alt = yield this.connection.getAddressLookupTable(lookupTable);
74
84
  if (alt.value === null) {
75
85
  throw new Error(`Address lookup table: ${lookupTable} does not exist on the blockchain.`);
@@ -78,6 +88,44 @@ class TransactionBatchExecute {
78
88
  }
79
89
  });
80
90
  }
91
+ /**
92
+ * Get list of lookup tables to download
93
+ */
94
+ getListOfAltsToDownload() {
95
+ const alts = this.alts.map(alt => alt.key.toBase58());
96
+ const toDownload = [];
97
+ for (const alt of this.lookupTableAddresses) {
98
+ if (!alts.includes(alt.toBase58())) {
99
+ toDownload.push(alt);
100
+ }
101
+ }
102
+ return toDownload;
103
+ }
104
+ /**
105
+ * Filter lookup tables
106
+ */
107
+ filterLookupTables() {
108
+ const map = {};
109
+ for (const alt of this.lookupTableAddresses) {
110
+ map[alt.toBase58()] = 1;
111
+ }
112
+ const filtered = [];
113
+ for (const alt in map) {
114
+ filtered.push(new web3.PublicKey(alt));
115
+ }
116
+ this.lookupTableAddresses = filtered;
117
+ }
118
+ /**
119
+ * Get public keys from instruction
120
+ * @returns
121
+ */
122
+ getPubkeyFromInstruction() {
123
+ const pubkeys = [];
124
+ this.instructions.map(ix => {
125
+ pubkeys.push(...ix.keys.map(meta => meta.pubkey));
126
+ });
127
+ return pubkeys;
128
+ }
81
129
  /**
82
130
  * Override signers (in case that signers are set to empty array)
83
131
  *
@@ -6907,7 +6907,7 @@ export type IyfExtension = {
6907
6907
  },
6908
6908
  {
6909
6909
  "name": "authority";
6910
- "isMut": false;
6910
+ "isMut": true;
6911
6911
  "isSigner": false;
6912
6912
  },
6913
6913
  {
@@ -6959,6 +6959,11 @@ export type IyfExtension = {
6959
6959
  "path": "user_pda";
6960
6960
  }
6961
6961
  ];
6962
+ "programId": {
6963
+ "kind": "account";
6964
+ "type": "publicKey";
6965
+ "path": "iyf_program";
6966
+ };
6962
6967
  };
6963
6968
  },
6964
6969
  {
@@ -6985,6 +6990,11 @@ export type IyfExtension = {
6985
6990
  "path": "user_pda";
6986
6991
  }
6987
6992
  ];
6993
+ "programId": {
6994
+ "kind": "account";
6995
+ "type": "publicKey";
6996
+ "path": "iyf_program";
6997
+ };
6988
6998
  };
6989
6999
  },
6990
7000
  {
@@ -7182,11 +7192,35 @@ export type IyfExtension = {
7182
7192
  "type": "publicKey";
7183
7193
  },
7184
7194
  {
7185
- "name": "assetInfos";
7195
+ "name": "txLength";
7196
+ "type": "u8";
7197
+ },
7198
+ {
7199
+ "name": "slot";
7200
+ "type": "u64";
7201
+ },
7202
+ {
7203
+ "name": "atomicityHash";
7186
7204
  "type": {
7187
- "vec": {
7188
- "defined": "UserAssetInfo";
7189
- };
7205
+ "array": [
7206
+ "publicKey",
7207
+ 10
7208
+ ];
7209
+ };
7210
+ },
7211
+ {
7212
+ "name": "assetInfo";
7213
+ "type": {
7214
+ "defined": "UserAssetInfo";
7215
+ };
7216
+ },
7217
+ {
7218
+ "name": "padding";
7219
+ "type": {
7220
+ "array": [
7221
+ "u8",
7222
+ 285
7223
+ ];
7190
7224
  };
7191
7225
  }
7192
7226
  ];