@haven-fi/solauto-sdk 1.0.84 → 1.0.85
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/transactions/transactionsManager.d.ts +3 -3
- package/dist/transactions/transactionsManager.d.ts.map +1 -1
- package/dist/transactions/transactionsManager.js +2 -1
- package/package.json +1 -1
- package/src/transactions/transactionsManager.ts +5 -3
- package/tests/transactions/solautoMarginfi.ts +1 -1
@@ -2,7 +2,7 @@ import { AddressLookupTableInput, TransactionBuilder, Umi } from "@metaplex-foun
|
|
2
2
|
import { SolautoClient } from "../clients/solautoClient";
|
3
3
|
import { ErrorsToThrow } from "../utils/generalUtils";
|
4
4
|
import { PriorityFeeSetting } from "../types";
|
5
|
-
import { TxHandler } from "../clients";
|
5
|
+
import { ReferralStateManager, TxHandler } from "../clients";
|
6
6
|
declare class LookupTables {
|
7
7
|
defaultLuts: string[];
|
8
8
|
private umi;
|
@@ -57,11 +57,11 @@ export declare class TransactionsManager {
|
|
57
57
|
private errorsToThrow?;
|
58
58
|
private statuses;
|
59
59
|
private lookupTables;
|
60
|
-
constructor(txHandler:
|
60
|
+
constructor(txHandler: SolautoClient | ReferralStateManager, statusCallback?: ((statuses: TransactionManagerStatuses) => void) | undefined, simulateOnly?: boolean | undefined, mustBeAtomic?: boolean | undefined, errorsToThrow?: ErrorsToThrow | undefined);
|
61
61
|
private assembleTransactionSets;
|
62
62
|
updateStatus(name: string, status: TransactionStatus, txSig?: string): void;
|
63
63
|
debugAccounts(itemSet: TransactionSet, tx: TransactionBuilder): Promise<void>;
|
64
|
-
|
64
|
+
clientSend(items: TransactionItem[], prioritySetting?: PriorityFeeSetting): Promise<void>;
|
65
65
|
send(items: TransactionItem[], prioritySetting?: PriorityFeeSetting, initialized?: boolean): Promise<void>;
|
66
66
|
}
|
67
67
|
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transactionsManager.d.ts","sourceRoot":"","sources":["../../src/transactions/transactionsManager.ts"],"names":[],"mappings":"AACA,OAAO,EACL,uBAAuB,EAEvB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,EAAE,0BAA0B,KAAK,IAAI,aAAA,EAC/D,YAAY,CAAC,EAAE,OAAO,YAAA,EACtB,YAAY,CAAC,EAAE,OAAO,YAAA,EACtB,aAAa,CAAC,EAAE,aAAa,YAAA;YAKzB,uBAAuB;IAsCrC,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,MAAM;IAiB9D,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,kBAAkB;IAkB7D,UAAU,CAAC,KAAK,EAAE,eAAe,EAAE,EAAE,eAAe,CAAC,EAAE,kBAAkB;IAkEzE,IAAI,CAAC,KAAK,EAAE,eAAe,EAAE,EAAE,eAAe,CAAC,EAAE,kBAAkB,EAAE,WAAW,CAAC,EAAE,OAAO;CAyGjG"}
|
@@ -189,7 +189,8 @@ class TransactionsManager {
|
|
189
189
|
}
|
190
190
|
}
|
191
191
|
}
|
192
|
-
async
|
192
|
+
async clientSend(items, prioritySetting) {
|
193
|
+
const client = this.txHandler;
|
193
194
|
const updateLookupTable = await client.updateLookupTable();
|
194
195
|
if (updateLookupTable &&
|
195
196
|
updateLookupTable.updateLutTx.getInstructions().length > 0 &&
|
package/package.json
CHANGED
@@ -17,7 +17,7 @@ import {
|
|
17
17
|
import { getTransactionChores } from "./transactionUtils";
|
18
18
|
import { PriorityFeeSetting } from "../types";
|
19
19
|
import { Connection, PublicKey } from "@solana/web3.js";
|
20
|
-
import { TxHandler } from "../clients";
|
20
|
+
import { ReferralStateManager, TxHandler } from "../clients";
|
21
21
|
// import { sendJitoBundledTransactions } from "../utils/jitoUtils";
|
22
22
|
|
23
23
|
class LookupTables {
|
@@ -183,7 +183,7 @@ export class TransactionsManager {
|
|
183
183
|
private lookupTables: LookupTables;
|
184
184
|
|
185
185
|
constructor(
|
186
|
-
private txHandler:
|
186
|
+
private txHandler: SolautoClient | ReferralStateManager,
|
187
187
|
private statusCallback?: (statuses: TransactionManagerStatuses) => void,
|
188
188
|
private simulateOnly?: boolean,
|
189
189
|
private mustBeAtomic?: boolean,
|
@@ -265,7 +265,9 @@ export class TransactionsManager {
|
|
265
265
|
}
|
266
266
|
}
|
267
267
|
|
268
|
-
async
|
268
|
+
async clientSend(items: TransactionItem[], prioritySetting?: PriorityFeeSetting) {
|
269
|
+
const client = this.txHandler as SolautoClient;
|
270
|
+
|
269
271
|
const updateLookupTable = await client.updateLookupTable();
|
270
272
|
if (
|
271
273
|
updateLookupTable &&
|