@haven-fi/solauto-sdk 1.0.271 → 1.0.273
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/transactions/transactionsManager.d.ts +0 -1
- package/dist/transactions/transactionsManager.d.ts.map +1 -1
- package/dist/transactions/transactionsManager.js +5 -8
- package/dist/utils/solanaUtils.d.ts.map +1 -1
- package/dist/utils/solanaUtils.js +0 -15
- package/package.json +2 -2
- package/src/transactions/transactionsManager.ts +8 -11
- package/src/utils/solanaUtils.ts +0 -16
@@ -41,7 +41,6 @@ export declare class TransactionsManager {
|
|
41
41
|
private retries;
|
42
42
|
private retryDelay;
|
43
43
|
private statuses;
|
44
|
-
private statusesStartIdx;
|
45
44
|
private lookupTables;
|
46
45
|
constructor(txHandler: SolautoClient | ReferralStateManager, statusCallback?: ((statuses: TransactionManagerStatuses) => void) | undefined, txType?: TransactionRunType | undefined, priorityFeeSetting?: PriorityFeeSetting, errorsToThrow?: ErrorsToThrow | undefined, retries?: number, retryDelay?: number);
|
47
46
|
private assembleTransactionSets;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transactionsManager.d.ts","sourceRoot":"","sources":["../../src/transactions/transactionsManager.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAKzD,OAAO,EACL,aAAa,EAEd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,kBAAkB,EAElB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,oBAAoB,EAAa,MAAM,YAAY,CAAC;AAO7D,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,EAAE,MAAM;CAK5B;AAqCD,qBAAa,eAAe;IAMjB,OAAO,EAAE,CACd,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC;IACxC,IAAI,CAAC,EAAE,MAAM;IARtB,oBAAoB,EAAG,MAAM,EAAE,CAAC;IAChC,EAAE,CAAC,EAAE,kBAAkB,CAAC;IACjB,WAAW,EAAE,OAAO,CAAS;gBAG3B,OAAO,EAAE,CACd,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,EACxC,IAAI,CAAC,EAAE,MAAM,YAAA;IAGhB,UAAU;IAKV,OAAO,CAAC,UAAU,EAAE,MAAM;IAMhC,cAAc,IAAI,MAAM,EAAE;CAY3B;AAmFD,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,EAAE,CAAC;AAEJ,qBAAa,mBAAmB;
|
1
|
+
{"version":3,"file":"transactionsManager.d.ts","sourceRoot":"","sources":["../../src/transactions/transactionsManager.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAKzD,OAAO,EACL,aAAa,EAEd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,kBAAkB,EAElB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,oBAAoB,EAAa,MAAM,YAAY,CAAC;AAO7D,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,EAAE,MAAM;CAK5B;AAqCD,qBAAa,eAAe;IAMjB,OAAO,EAAE,CACd,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,qBAAqB,GAAG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AC7B,OAAO,GAAE,MAAU,EACnB,UAAU,GAAE,MAAY;YAQpB,uBAAuB;IAwCrC,OAAO,CAAC,YAAY;YA8CN,aAAa;IAoB3B,OAAO,CAAC,4BAA4B;IAUpC,OAAO,CAAC,mBAAmB;YAMb,SAAS;IAgBV,UAAU,CACrB,YAAY,EAAE,eAAe,EAAE,GAC9B,OAAO,CAAC,0BAA0B,CAAC;IA+DzB,IAAI,CACf,KAAK,EAAE,eAAe,EAAE,GACvB,OAAO,CAAC,0BAA0B,CAAC;YA+BxB,qBAAqB;YAgDrB,cAAc;YAqCd,eAAe;CAkD9B"}
|
@@ -104,9 +104,11 @@ class TransactionSet {
|
|
104
104
|
const transactions = this.items
|
105
105
|
.filter((x) => x.tx && x.tx.getInstructions().length > 0)
|
106
106
|
.map((x) => x.tx);
|
107
|
+
const lutInputs = await this.lookupTables.getLutInputs(this.lutAddresses());
|
108
|
+
this.txHandler.log(lutInputs);
|
107
109
|
return (0, umi_1.transactionBuilder)()
|
108
110
|
.add(transactions)
|
109
|
-
.setAddressLookupTables(
|
111
|
+
.setAddressLookupTables(lutInputs);
|
110
112
|
}
|
111
113
|
lutAddresses() {
|
112
114
|
return Array.from(new Set(this.items.map((x) => x.lookupTableAddresses).flat()));
|
@@ -144,7 +146,6 @@ class TransactionsManager {
|
|
144
146
|
this.retries = retries;
|
145
147
|
this.retryDelay = retryDelay;
|
146
148
|
this.statuses = [];
|
147
|
-
this.statusesStartIdx = 0;
|
148
149
|
this.lookupTables = new LookupTables(this.txHandler.defaultLookupTables(), this.txHandler.umi);
|
149
150
|
}
|
150
151
|
async assembleTransactionSets(items) {
|
@@ -295,7 +296,6 @@ class TransactionsManager {
|
|
295
296
|
}
|
296
297
|
this.txHandler.log("Transaction items:", items.length);
|
297
298
|
const itemSets = await this.assembleTransactionSets(items);
|
298
|
-
this.statusesStartIdx = this.statuses.length;
|
299
299
|
this.updateStatusForSets(itemSets);
|
300
300
|
this.txHandler.log("Initial item sets:", itemSets.length);
|
301
301
|
if (this.txType === "only-simulate" && itemSets.length > 1) {
|
@@ -343,15 +343,12 @@ class TransactionsManager {
|
|
343
343
|
]);
|
344
344
|
if (newItemSets.length > 1) {
|
345
345
|
itemSets.splice(currentIndex, itemSets.length - currentIndex, ...newItemSets);
|
346
|
-
const startOfQueuedStatuses = this.statuses.findIndex(x => x.status === TransactionStatus.Queued);
|
346
|
+
const startOfQueuedStatuses = this.statuses.findIndex((x) => x.status === TransactionStatus.Queued);
|
347
347
|
this.statuses.splice(startOfQueuedStatuses, this.statuses.length - startOfQueuedStatuses, ...newItemSets.map((x, i) => ({
|
348
348
|
name: x.name(),
|
349
349
|
attemptNum: i === 0 ? attemptNum : 0,
|
350
|
-
status: TransactionStatus.Queued,
|
350
|
+
status: i === 0 ? TransactionStatus.Processing : TransactionStatus.Queued,
|
351
351
|
})));
|
352
|
-
// if (this.statuses.map(x => x.name).includes(newItemSets[0].name())) {
|
353
|
-
// }
|
354
|
-
// this.updateStatusForSets(newItemSets.splice(1));
|
355
352
|
}
|
356
353
|
return newItemSets[0];
|
357
354
|
}
|
@@ -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;AAOlC,OAAO,EAKL,UAAU,EACV,SAAS,EAKT,sBAAsB,EAEvB,MAAM,iBAAiB,CAAC;AAgBzB,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAIlE,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,UAErD;AAED,wBAAgB,oBAAoB,CAAC,eAAe,EAAE,MAAM,UAE3D;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,SAAS,GAAE,SAAgC,GAC1C,CAAC,UAAU,EAAE,GAAG,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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,sBAAsB,CAC1C,GAAG,EAAE,GAAG,EACR,oBAAoB,EAAE,MAAM,EAAE,GAC7B,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAkBpC;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,kBAAkB,EAC/B,gBAAgB,CAAC,EAAE,MAAM,EACzB,gBAAgB,CAAC,EAAE,MAAM,sBAiE1B;AAmBD,wBAAsB,2BAA2B,CAC/C,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,kBAAkB,EACtB,eAAe,EAAE,kBAAkB,GAClC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAsB7B;AAiDD,wBAAsB,8BAA8B,CAClD,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,kBAAkB,EACtB,MAAM,CAAC,EAAE,kBAAkB,EAC3B,eAAe,GAAE,kBAA2C,EAC5D,cAAc,CAAC,EAAE,MAAM,IAAI,GAC1B,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CA6DjC"}
|
@@ -213,7 +213,6 @@ async function sendSingleOptimizedTransaction(umi, connection, tx, txType, prior
|
|
213
213
|
}
|
214
214
|
let computeUnitLimit = undefined;
|
215
215
|
if (txType !== "skip-simulation") {
|
216
|
-
// TODO: we should only retry simulation if it's not a solauto error
|
217
216
|
const simulationResult = await (0, generalUtils_1.retryWithExponentialBackoff)(async () => await simulateTransaction(connection, (0, umi_web3js_adapters_1.toWeb3JsTransaction)(await (await assembleFinalTransaction(umi.identity, tx, cuPrice, 1400000).setLatestBlockhash(umi)).build(umi))), 3);
|
218
217
|
simulationResult.value.err;
|
219
218
|
computeUnitLimit = Math.round(simulationResult.value.unitsConsumed * 1.1);
|
@@ -221,20 +220,6 @@ async function sendSingleOptimizedTransaction(umi, connection, tx, txType, prior
|
|
221
220
|
}
|
222
221
|
if (txType !== "only-simulate") {
|
223
222
|
onAwaitingSign?.();
|
224
|
-
// const result = await assembleFinalTransaction(
|
225
|
-
// umi.identity,
|
226
|
-
// tx,
|
227
|
-
// cuPrice,
|
228
|
-
// computeUnitLimit
|
229
|
-
// ).sendAndConfirm(umi, {
|
230
|
-
// send: {
|
231
|
-
// skipPreflight: true,
|
232
|
-
// commitment: "confirmed",
|
233
|
-
// maxRetries: 0
|
234
|
-
// },
|
235
|
-
// confirm: { commitment: "confirmed" },
|
236
|
-
// });
|
237
|
-
// const txSig = bs58.encode(result.signature);
|
238
223
|
const blockhash = await connection.getLatestBlockhash("confirmed");
|
239
224
|
const signedTx = await assembleFinalTransaction(umi.identity, tx, cuPrice, computeUnitLimit)
|
240
225
|
.setBlockhash(blockhash)
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@haven-fi/solauto-sdk",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.273",
|
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",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"@metaplex-foundation/umi-signer-wallet-adapters": "^0.9.1",
|
22
22
|
"@metaplex-foundation/umi-web3js-adapters": "^0.9.1",
|
23
23
|
"@solana/spl-token": "^0.4.0",
|
24
|
-
"@solana/web3.js": "^1.
|
24
|
+
"@solana/web3.js": "^1.95.4",
|
25
25
|
"bs58": "^5.0.0",
|
26
26
|
"cross-fetch": "^4.0.0",
|
27
27
|
"rpc-websockets": "7.11.0"
|
@@ -159,11 +159,11 @@ class TransactionSet {
|
|
159
159
|
.filter((x) => x.tx && x.tx.getInstructions().length > 0)
|
160
160
|
.map((x) => x.tx!);
|
161
161
|
|
162
|
+
const lutInputs = await this.lookupTables.getLutInputs(this.lutAddresses());
|
163
|
+
this.txHandler.log(lutInputs);
|
162
164
|
return transactionBuilder()
|
163
165
|
.add(transactions)
|
164
|
-
.setAddressLookupTables(
|
165
|
-
await this.lookupTables.getLutInputs(this.lutAddresses())
|
166
|
-
);
|
166
|
+
.setAddressLookupTables(lutInputs);
|
167
167
|
}
|
168
168
|
|
169
169
|
lutAddresses(): string[] {
|
@@ -208,7 +208,6 @@ export type TransactionManagerStatuses = {
|
|
208
208
|
|
209
209
|
export class TransactionsManager {
|
210
210
|
private statuses: TransactionManagerStatuses = [];
|
211
|
-
private statusesStartIdx: number = 0;
|
212
211
|
private lookupTables: LookupTables;
|
213
212
|
|
214
213
|
constructor(
|
@@ -443,7 +442,6 @@ export class TransactionsManager {
|
|
443
442
|
|
444
443
|
this.txHandler.log("Transaction items:", items.length);
|
445
444
|
const itemSets = await this.assembleTransactionSets(items);
|
446
|
-
this.statusesStartIdx = this.statuses.length;
|
447
445
|
this.updateStatusForSets(itemSets);
|
448
446
|
this.txHandler.log("Initial item sets:", itemSets.length);
|
449
447
|
|
@@ -530,20 +528,19 @@ export class TransactionsManager {
|
|
530
528
|
itemSets.length - currentIndex,
|
531
529
|
...newItemSets
|
532
530
|
);
|
533
|
-
const startOfQueuedStatuses = this.statuses.findIndex(
|
531
|
+
const startOfQueuedStatuses = this.statuses.findIndex(
|
532
|
+
(x) => x.status === TransactionStatus.Queued
|
533
|
+
);
|
534
534
|
this.statuses.splice(
|
535
535
|
startOfQueuedStatuses,
|
536
536
|
this.statuses.length - startOfQueuedStatuses,
|
537
537
|
...newItemSets.map((x, i) => ({
|
538
538
|
name: x.name(),
|
539
539
|
attemptNum: i === 0 ? attemptNum : 0,
|
540
|
-
status:
|
540
|
+
status:
|
541
|
+
i === 0 ? TransactionStatus.Processing : TransactionStatus.Queued,
|
541
542
|
}))
|
542
543
|
);
|
543
|
-
// if (this.statuses.map(x => x.name).includes(newItemSets[0].name())) {
|
544
|
-
|
545
|
-
// }
|
546
|
-
// this.updateStatusForSets(newItemSets.splice(1));
|
547
544
|
}
|
548
545
|
|
549
546
|
return newItemSets[0];
|
package/src/utils/solanaUtils.ts
CHANGED
@@ -367,7 +367,6 @@ export async function sendSingleOptimizedTransaction(
|
|
367
367
|
|
368
368
|
let computeUnitLimit = undefined;
|
369
369
|
if (txType !== "skip-simulation") {
|
370
|
-
// TODO: we should only retry simulation if it's not a solauto error
|
371
370
|
const simulationResult = await retryWithExponentialBackoff(
|
372
371
|
async () =>
|
373
372
|
await simulateTransaction(
|
@@ -392,21 +391,6 @@ export async function sendSingleOptimizedTransaction(
|
|
392
391
|
|
393
392
|
if (txType !== "only-simulate") {
|
394
393
|
onAwaitingSign?.();
|
395
|
-
// const result = await assembleFinalTransaction(
|
396
|
-
// umi.identity,
|
397
|
-
// tx,
|
398
|
-
// cuPrice,
|
399
|
-
// computeUnitLimit
|
400
|
-
// ).sendAndConfirm(umi, {
|
401
|
-
// send: {
|
402
|
-
// skipPreflight: true,
|
403
|
-
// commitment: "confirmed",
|
404
|
-
// maxRetries: 0
|
405
|
-
// },
|
406
|
-
// confirm: { commitment: "confirmed" },
|
407
|
-
// });
|
408
|
-
// const txSig = bs58.encode(result.signature);
|
409
|
-
|
410
394
|
const blockhash = await connection.getLatestBlockhash("confirmed");
|
411
395
|
const signedTx = await assembleFinalTransaction(
|
412
396
|
umi.identity,
|