@hawksightco/hawk-sdk 1.1.38 → 1.1.40
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.
- package/dist/src/classes/CreateTxMetadata.d.ts.map +1 -1
- package/dist/src/classes/CreateTxMetadata.js +2 -12
- package/dist/src/classes/MultiTransaction.d.ts +76 -0
- package/dist/src/classes/MultiTransaction.d.ts.map +1 -0
- package/dist/src/classes/MultiTransaction.js +288 -0
- package/dist/src/classes/Transaction copy.d.ts +162 -0
- package/dist/src/classes/Transaction copy.d.ts.map +1 -0
- package/dist/src/classes/Transaction copy.js +458 -0
- package/dist/src/classes/Transaction.d.ts +42 -12
- package/dist/src/classes/Transaction.d.ts.map +1 -1
- package/dist/src/classes/Transaction2.d.ts +108 -0
- package/dist/src/classes/Transaction2.d.ts.map +1 -0
- package/dist/src/classes/Transaction2.js +239 -0
- package/dist/src/classes/Transaction3.d.ts +166 -0
- package/dist/src/classes/Transaction3.d.ts.map +1 -0
- package/dist/src/classes/Transaction3.js +405 -0
- package/dist/src/classes/TransactionBatchExecute2.d.ts +18 -0
- package/dist/src/classes/TransactionBatchExecute2.d.ts.map +1 -1
- package/dist/src/classes/TransactionBatchExecute2.js +72 -1
- package/dist/src/classes/Transactions.d.ts +4 -2
- package/dist/src/classes/Transactions.d.ts.map +1 -1
- package/dist/src/classes/Transactions.js +17 -11
- package/dist/src/classes/TxGenerator.d.ts +2 -1
- package/dist/src/classes/TxGenerator.d.ts.map +1 -1
- package/dist/src/classes/TxGenerator.js +8 -23
- package/dist/src/functions.d.ts +25 -0
- package/dist/src/functions.d.ts.map +1 -1
- package/dist/src/functions.js +76 -3
- package/dist/src/meteora.d.ts +1 -1
- package/dist/src/meteora.d.ts.map +1 -1
- package/dist/src/meteora.js +37 -2
- package/dist/src/types.d.ts +6 -7
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateTxMet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E,cAAc,EAC9B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,2BAA2B,GAChC,OAAO,CAAC,mBAAmB,CAAC;IA0DzB,iBAAiB,CACrB,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,2BAA2B,GAChC,OAAO,CAAC,mBAAmB,EAAE,CAAC;CAuElC"}
|
|
@@ -252,22 +252,12 @@ class CreateTxMetadata {
|
|
|
252
252
|
const alts = [];
|
|
253
253
|
(0, Logging_1.Log)(`createTxMetadata2`);
|
|
254
254
|
const mainStartTime = new Date().getTime() / 1000;
|
|
255
|
-
// Find jup alts
|
|
256
|
-
let startTime = mainStartTime;
|
|
257
|
-
const jupAlts = yield generalUtility.findAltWithTxPost({ transaction: data });
|
|
258
|
-
(0, Logging_1.Log)(`createTxMetadata2: Checkpoint: (jupAlts) ${(new Date().getTime() / 1000) - startTime}`);
|
|
259
|
-
startTime = new Date().getTime() / 1000;
|
|
260
|
-
const lookupTableAddresses = data.addressLookupTableAddresses.map(p => new web3.PublicKey(p));
|
|
261
|
-
if (jupAlts.status === 200) {
|
|
262
|
-
lookupTableAddresses.push(...jupAlts.data.map(p => new web3.PublicKey(p)));
|
|
263
|
-
}
|
|
264
|
-
(0, Logging_1.Log)(`createTxMetadata2: Checkpoint: (jupAlts after loop) ${(new Date().getTime() / 1000) - startTime}`);
|
|
265
255
|
// Get the recent blockhash
|
|
266
|
-
startTime =
|
|
256
|
+
let startTime = mainStartTime;
|
|
267
257
|
const latestBlockhash = yield connection.getLatestBlockhash();
|
|
268
258
|
(0, Logging_1.Log)(`createTxMetadata2: Checkpoint: (latestBlockhash) ${(new Date().getTime() / 1000) - startTime}`);
|
|
269
259
|
startTime = new Date().getTime() / 1000;
|
|
270
|
-
const batchExecute = new TransactionBatchExecute2_1.TransactionBatchExecute2(
|
|
260
|
+
const batchExecute = new TransactionBatchExecute2_1.TransactionBatchExecute2(data.addressLookupTableAddresses.map(p => new web3.PublicKey(p)), data.mainInstructions.map(ix => {
|
|
271
261
|
const keys = ix.accounts.map(meta => {
|
|
272
262
|
return {
|
|
273
263
|
pubkey: new web3.PublicKey(meta.pubkey),
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/// <reference types="@meteora-ag/dlmm/node_modules/@solana/web3.js" />
|
|
2
|
+
import * as web3 from "@solana/web3.js";
|
|
3
|
+
import * as client from "@hawksightco/swagger-client";
|
|
4
|
+
import { GeneralUtility } from "./GeneralUtility";
|
|
5
|
+
import { SendSignedTx, SignerPlugin, SignerPlugin2 } from "../types";
|
|
6
|
+
type CreateDurableNonceAccountOpts = {
|
|
7
|
+
userSignedFn: () => void;
|
|
8
|
+
userDidntSignedFn: () => void;
|
|
9
|
+
successFn: (txid: string) => void;
|
|
10
|
+
failedFn: (message: string, logToMixpanel: boolean) => void;
|
|
11
|
+
};
|
|
12
|
+
type SignAndSendOpts = {
|
|
13
|
+
userSignedFn: () => void;
|
|
14
|
+
userDidntSignedFn: () => void;
|
|
15
|
+
successFn: (txids: string[]) => void;
|
|
16
|
+
failedFn: (message: string, logToMixpanel: boolean) => void;
|
|
17
|
+
};
|
|
18
|
+
export declare class MultiTransaction {
|
|
19
|
+
readonly description: string;
|
|
20
|
+
readonly generalUtility: GeneralUtility;
|
|
21
|
+
latestBlockhash: {
|
|
22
|
+
blockhash: web3.Blockhash;
|
|
23
|
+
lastValidBlockHeight: number;
|
|
24
|
+
};
|
|
25
|
+
readonly payerKey: web3.PublicKey;
|
|
26
|
+
private txs;
|
|
27
|
+
private nonceAdvanceIxCount;
|
|
28
|
+
private nonceAccounts;
|
|
29
|
+
/**
|
|
30
|
+
* Get transaction count
|
|
31
|
+
*/
|
|
32
|
+
get count(): number;
|
|
33
|
+
constructor(description: string, generalUtility: GeneralUtility, latestBlockhash: {
|
|
34
|
+
blockhash: web3.Blockhash;
|
|
35
|
+
lastValidBlockHeight: number;
|
|
36
|
+
}, payerKey: web3.PublicKey);
|
|
37
|
+
push(alts: web3.AddressLookupTableAccount[], ixs: web3.TransactionInstruction[]): void;
|
|
38
|
+
getPayerOwnedNonceAccounts(connection: web3.Connection): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Whether there were enough nonce accounts already initialized on-chain
|
|
41
|
+
*
|
|
42
|
+
* @param connection
|
|
43
|
+
* @returns
|
|
44
|
+
*/
|
|
45
|
+
hasAvailableNonce(connection: web3.Connection): Promise<boolean>;
|
|
46
|
+
/**
|
|
47
|
+
* Generate a transaction that creates durable nonce account
|
|
48
|
+
*
|
|
49
|
+
* @param connection
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
createDurableNonceAccount(connection: web3.Connection, signerFn: SignerPlugin, sendSigned: SendSignedTx, opts: CreateDurableNonceAccountOpts): Promise<boolean>;
|
|
53
|
+
signAndSend(connection: web3.Connection, priorityLevel: client.PriorityLevel, priorityFeeMaxCap: number, signMultipleTransactions: SignerPlugin2, sendSignedTx: SendSignedTx, opts: SignAndSendOpts): Promise<void>;
|
|
54
|
+
private generateTransasctions;
|
|
55
|
+
private transactionInstance;
|
|
56
|
+
/**
|
|
57
|
+
* Generate nonde advance instruction (dummy instruction)
|
|
58
|
+
*/
|
|
59
|
+
private nonceAdvanceIx;
|
|
60
|
+
/**
|
|
61
|
+
* Get nonce index
|
|
62
|
+
*
|
|
63
|
+
* @returns
|
|
64
|
+
*/
|
|
65
|
+
private getNonceIndex;
|
|
66
|
+
/**
|
|
67
|
+
* Get fee estimate
|
|
68
|
+
*
|
|
69
|
+
* @param priorityLevel
|
|
70
|
+
* @returns
|
|
71
|
+
*/
|
|
72
|
+
private getFeeEstimate;
|
|
73
|
+
private getFeeEstimate2;
|
|
74
|
+
}
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=MultiTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiTransa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ChC,eAAe,EAAE;QACtB,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC;QAC1B,oBAAoB,EAAE,MAAM,CAAA;KAC7B,EACQ,QAAQ,EAAE,IAAI,CAAC,SAAS;IAGnC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,yBAAyB,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,sBAAsB,EAAE;IAOzE,0BAA0B,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU;IAI5D;;;;;OAKG;IACG,iBAAiB,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU;IAWnD;;;;;OAKG;IACG,yBAAyB,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,IAAI,EAAE,6BAA6B,GAAG,OAAO,CAAC,OAAO,CAAC;IAoE/J,WAAW,CACf,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,aAAa,EAAE,MAAM,CAAC,aAAa,EACnC,iBAAiB,EAAE,MAAM,EACzB,wBAAwB,EAAE,aAAa,EACvC,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,eAAe;YA+CT,qBAAqB;IA0BnC,OAAO,CAAC,mBAAmB;IAU3B;;OAEG;IACH,OAAO,CAAC,cAAc;IAUtB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAWrB;;;;;OAKG;YACW,cAAc;YAYd,eAAe;CAgB9B"}
|
|
@@ -0,0 +1,288 @@
|
|
|
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
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.MultiTransaction = void 0;
|
|
36
|
+
const web3 = __importStar(require("@solana/web3.js"));
|
|
37
|
+
const functions_1 = require("../functions");
|
|
38
|
+
const Transaction2_1 = require("./Transaction2");
|
|
39
|
+
const Logging_1 = require("./Logging");
|
|
40
|
+
const functions_2 = require("../functions");
|
|
41
|
+
class MultiTransaction {
|
|
42
|
+
/**
|
|
43
|
+
* Get transaction count
|
|
44
|
+
*/
|
|
45
|
+
get count() {
|
|
46
|
+
return this.txs.length;
|
|
47
|
+
}
|
|
48
|
+
constructor(description, generalUtility, latestBlockhash, payerKey) {
|
|
49
|
+
this.description = description;
|
|
50
|
+
this.generalUtility = generalUtility;
|
|
51
|
+
this.latestBlockhash = latestBlockhash;
|
|
52
|
+
this.payerKey = payerKey;
|
|
53
|
+
this.txs = [];
|
|
54
|
+
this.nonceAdvanceIxCount = 0;
|
|
55
|
+
this.nonceAccounts = [];
|
|
56
|
+
}
|
|
57
|
+
push(alts, ixs) {
|
|
58
|
+
this.txs.push([alts, ixs]);
|
|
59
|
+
const currentIndex = this.txs.length - 1;
|
|
60
|
+
const result = this.getNonceIndex(currentIndex);
|
|
61
|
+
this.nonceAdvanceIxCount += result > -1 ? 1 : 0;
|
|
62
|
+
}
|
|
63
|
+
getPayerOwnedNonceAccounts(connection) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
this.nonceAccounts = yield (0, functions_1.findNonceOwnedBy)(connection, this.payerKey, this.nonceAdvanceIxCount);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Whether there were enough nonce accounts already initialized on-chain
|
|
70
|
+
*
|
|
71
|
+
* @param connection
|
|
72
|
+
* @returns
|
|
73
|
+
*/
|
|
74
|
+
hasAvailableNonce(connection) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
if (this.nonceAdvanceIxCount === 0) {
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
(0, functions_1.benchmark)({ name: `hasAvailableNonce`, msg: `await this.getPayerOwnedNonceAccounts(connection)` });
|
|
81
|
+
yield this.getPayerOwnedNonceAccounts(connection);
|
|
82
|
+
(0, functions_1.benchmark)({ name: `hasAvailableNonce`, msg: `await this.getPayerOwnedNonceAccounts(connection)`, end: true });
|
|
83
|
+
return this.nonceAccounts.length >= this.nonceAdvanceIxCount;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Generate a transaction that creates durable nonce account
|
|
89
|
+
*
|
|
90
|
+
* @param connection
|
|
91
|
+
* @returns
|
|
92
|
+
*/
|
|
93
|
+
createDurableNonceAccount(connection, signerFn, sendSigned, opts) {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
const count = this.nonceAdvanceIxCount - this.nonceAccounts.length;
|
|
96
|
+
const instructions = [];
|
|
97
|
+
(0, functions_1.benchmark)({ name: `createDurableNonceAccount`, msg: `await connection.getMinimumBalanceForRentExemption(web3.NONCE_ACCOUNT_LENGTH)` });
|
|
98
|
+
const rentExempt = yield connection.getMinimumBalanceForRentExemption(web3.NONCE_ACCOUNT_LENGTH);
|
|
99
|
+
(0, functions_1.benchmark)({ name: `createDurableNonceAccount`, msg: `await connection.getMinimumBalanceForRentExemption(web3.NONCE_ACCOUNT_LENGTH)`, end: true });
|
|
100
|
+
for (let i = 0; i < count; i++) {
|
|
101
|
+
const noncePubkey = yield (0, functions_1.generateNonceAddressFromIndex)(this.payerKey, i);
|
|
102
|
+
instructions.push(...[
|
|
103
|
+
web3.SystemProgram.createAccountWithSeed({
|
|
104
|
+
fromPubkey: this.payerKey,
|
|
105
|
+
newAccountPubkey: noncePubkey,
|
|
106
|
+
basePubkey: this.payerKey,
|
|
107
|
+
seed: `hs-nonce-${i}`,
|
|
108
|
+
lamports: rentExempt,
|
|
109
|
+
space: web3.NONCE_ACCOUNT_LENGTH,
|
|
110
|
+
programId: web3.SystemProgram.programId,
|
|
111
|
+
}),
|
|
112
|
+
web3.SystemProgram.nonceInitialize({
|
|
113
|
+
noncePubkey,
|
|
114
|
+
authorizedPubkey: this.payerKey,
|
|
115
|
+
})
|
|
116
|
+
]);
|
|
117
|
+
}
|
|
118
|
+
(0, functions_1.benchmark)({ name: `createDurableNonceAccount`, msg: `await connection.getLatestBlockhash` });
|
|
119
|
+
const { blockhash: recentBlockhash, lastValidBlockHeight } = yield connection.getLatestBlockhash();
|
|
120
|
+
(0, functions_1.benchmark)({ name: `createDurableNonceAccount`, msg: `await connection.getLatestBlockhash`, end: true });
|
|
121
|
+
const tx = new web3.VersionedTransaction(new web3.TransactionMessage({
|
|
122
|
+
payerKey: this.payerKey,
|
|
123
|
+
instructions,
|
|
124
|
+
recentBlockhash,
|
|
125
|
+
}).compileToLegacyMessage());
|
|
126
|
+
const signedTx = yield (() => __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
try {
|
|
128
|
+
const signedTx = yield signerFn(tx);
|
|
129
|
+
opts.userSignedFn();
|
|
130
|
+
return signedTx;
|
|
131
|
+
}
|
|
132
|
+
catch (_a) {
|
|
133
|
+
opts.userDidntSignedFn();
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
}))();
|
|
137
|
+
if (signedTx === false) {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
const status = yield (() => __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
try {
|
|
142
|
+
(0, functions_1.benchmark)({ name: `createDurableNonceAccount`, msg: `await sendSigned(signedTx, lastValidBlockHeight)` });
|
|
143
|
+
const txid = yield sendSigned(signedTx, lastValidBlockHeight);
|
|
144
|
+
(0, functions_1.benchmark)({ name: `createDurableNonceAccount`, msg: `await sendSigned(signedTx, lastValidBlockHeight)`, end: true });
|
|
145
|
+
opts.successFn(txid);
|
|
146
|
+
(0, functions_1.benchmark)({ name: `createDurableNonceAccount`, msg: `await this.hasAvailableNonce(connection)` });
|
|
147
|
+
const status = yield this.hasAvailableNonce(connection);
|
|
148
|
+
(0, functions_1.benchmark)({ name: `createDurableNonceAccount`, msg: `await this.hasAvailableNonce(connection)`, end: true });
|
|
149
|
+
if (status === false) {
|
|
150
|
+
opts.failedFn(`Nonce account has been created, but we cannot fetch the account yet on blockchain. Please refresh your browser. Transaction ID: ${txid}`, false);
|
|
151
|
+
}
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
catch (_b) {
|
|
155
|
+
opts.failedFn(`Failed to create nonce account.`, true);
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
}))();
|
|
159
|
+
return status;
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
signAndSend(connection, priorityLevel, priorityFeeMaxCap, signMultipleTransactions, sendSignedTx, opts) {
|
|
163
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
164
|
+
(0, functions_1.benchmark)({ name: `signAndSend`, msg: `await connection.getLatestBlockhash()` });
|
|
165
|
+
const latestBlockhash = yield connection.getLatestBlockhash();
|
|
166
|
+
(0, functions_1.benchmark)({ name: `signAndSend`, msg: `await connection.getLatestBlockhash()`, end: true });
|
|
167
|
+
const txs = yield (() => __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
try {
|
|
169
|
+
const txs = yield signMultipleTransactions(yield this.generateTransasctions(connection, priorityLevel, priorityFeeMaxCap, latestBlockhash));
|
|
170
|
+
opts.userSignedFn();
|
|
171
|
+
return txs;
|
|
172
|
+
}
|
|
173
|
+
catch (_b) {
|
|
174
|
+
opts.userDidntSignedFn();
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
}))();
|
|
178
|
+
// If false, then return
|
|
179
|
+
if (!!!txs)
|
|
180
|
+
return;
|
|
181
|
+
// Otherwise continue
|
|
182
|
+
const promises = [];
|
|
183
|
+
let i = -1;
|
|
184
|
+
for (const tx of txs) {
|
|
185
|
+
i++;
|
|
186
|
+
const _tx = this.transactionInstance(this.txs[i][0], this.txs[i][1], latestBlockhash);
|
|
187
|
+
if (!_tx.hasNonceAdvanceIx) {
|
|
188
|
+
promises.push(sendSignedTx(tx, latestBlockhash.lastValidBlockHeight));
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
// Wait for transactions without nonce to succeed first.
|
|
192
|
+
try {
|
|
193
|
+
const txids = yield Promise.all(promises);
|
|
194
|
+
opts.successFn(txids);
|
|
195
|
+
promises.splice(0, promises.length);
|
|
196
|
+
const latestBlockhash = yield connection.getLatestBlockhash();
|
|
197
|
+
yield sendSignedTx(tx, latestBlockhash.lastValidBlockHeight);
|
|
198
|
+
}
|
|
199
|
+
catch (_a) {
|
|
200
|
+
opts.failedFn(`Transaction #${i} failed.`, true);
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
const txids = yield Promise.all(promises);
|
|
206
|
+
opts.successFn(txids);
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
generateTransasctions(connection, priorityLevel, priorityFeeMaxCap, latestBlockhash) {
|
|
210
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
+
(0, functions_1.benchmark)({ name: `generateTransasctions`, msg: `entire function` });
|
|
212
|
+
const estimate = yield this.getFeeEstimate(priorityLevel);
|
|
213
|
+
const txs = [];
|
|
214
|
+
let nonceIndex = 0;
|
|
215
|
+
for (const tuple of this.txs) {
|
|
216
|
+
const tx = this.transactionInstance(tuple[0], tuple[1], latestBlockhash);
|
|
217
|
+
const simulation = yield tx.simulateTransaction(connection);
|
|
218
|
+
const computeUnitLimit = Math.round(simulation.unitsConsumed * 1.15) + 100000; // + 15% + 100,000 additional CU to prevent exceeding CU.
|
|
219
|
+
tx.feeEstimate = estimate;
|
|
220
|
+
yield tx.addPriorityFeeIx(connection, computeUnitLimit, false, priorityLevel, priorityFeeMaxCap);
|
|
221
|
+
if (tx.hasNonceAdvanceIx) {
|
|
222
|
+
const nonceAccount = this.nonceAccounts[nonceIndex++];
|
|
223
|
+
const blockhash = nonceAccount.data.nonce;
|
|
224
|
+
const lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;
|
|
225
|
+
tx.setBlockhash(blockhash, lastValidBlockHeight);
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
const { blockhash, lastValidBlockHeight } = latestBlockhash;
|
|
229
|
+
tx.setBlockhash(blockhash, lastValidBlockHeight);
|
|
230
|
+
}
|
|
231
|
+
txs.push(tx.versionedTransaction);
|
|
232
|
+
}
|
|
233
|
+
(0, functions_1.benchmark)({ name: `generateTransasctions`, msg: ``, end: true });
|
|
234
|
+
return txs;
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
transactionInstance(alts, ixs, latestBlockhash) {
|
|
238
|
+
return Transaction2_1.Transaction2.new(this.payerKey, alts, this.generalUtility, ixs, latestBlockhash);
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Generate nonde advance instruction (dummy instruction)
|
|
242
|
+
*/
|
|
243
|
+
nonceAdvanceIx(noncePubkey) {
|
|
244
|
+
// Generate dummy nonce ix
|
|
245
|
+
return web3.SystemProgram.nonceAdvance({
|
|
246
|
+
/** Nonce account */
|
|
247
|
+
noncePubkey,
|
|
248
|
+
/** Public key of the nonce authority */
|
|
249
|
+
authorizedPubkey: this.payerKey,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Get nonce index
|
|
254
|
+
*
|
|
255
|
+
* @returns
|
|
256
|
+
*/
|
|
257
|
+
getNonceIndex(index) {
|
|
258
|
+
const referenceIx = this.nonceAdvanceIx(web3.Keypair.generate().publicKey);
|
|
259
|
+
const i = this.txs[index][1].findIndex(ix => {
|
|
260
|
+
const isNonceAdvanceIx = ix.data.toString("base64") == referenceIx.data.toString("base64") &&
|
|
261
|
+
ix.programId.toString() == referenceIx.programId.toString();
|
|
262
|
+
return isNonceAdvanceIx;
|
|
263
|
+
});
|
|
264
|
+
return i;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Get fee estimate
|
|
268
|
+
*
|
|
269
|
+
* @param priorityLevel
|
|
270
|
+
* @returns
|
|
271
|
+
*/
|
|
272
|
+
getFeeEstimate(priorityLevel) {
|
|
273
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
274
|
+
return yield this.getFeeEstimate2(priorityLevel, Transaction2_1.Transaction2.new(this.payerKey, this.txs[0][0], this.generalUtility, this.txs[0][1]).txMetadataResponse);
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
getFeeEstimate2(priorityLevel, txMetadataResponse) {
|
|
278
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
279
|
+
// Get fee estimate by simulating the transaction
|
|
280
|
+
const startTime = new Date().getTime() / 1000;
|
|
281
|
+
(0, Logging_1.Log)(`addPriorityFeeIx: Starting getFeeEstimate function`);
|
|
282
|
+
let estimate = yield (0, functions_2.getFeeEstimate)(this.generalUtility, priorityLevel, txMetadataResponse);
|
|
283
|
+
(0, Logging_1.Log)(`addPriorityFeeIx: Starting getFeeEstimate function: Elapsed Time: ${(new Date().getTime() / 1000) - startTime}`);
|
|
284
|
+
return estimate;
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
exports.MultiTransaction = MultiTransaction;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/// <reference types="@meteora-ag/dlmm/node_modules/@solana/web3.js" />
|
|
2
|
+
import * as client from "@hawksightco/swagger-client";
|
|
3
|
+
import * as web3 from "@solana/web3.js";
|
|
4
|
+
import { SimulatedTransactionResponse, TransactionMetadataResponse } from "../types";
|
|
5
|
+
import { GeneralUtility } from "./GeneralUtility";
|
|
6
|
+
/**
|
|
7
|
+
* Represents a transaction object in Solana using the web3.js library.
|
|
8
|
+
* This class encapsulates the logic for creating, signing, and verifying signatures of transactions.
|
|
9
|
+
*/
|
|
10
|
+
export declare class Transaction {
|
|
11
|
+
readonly txMetadataResponse: TransactionMetadataResponse;
|
|
12
|
+
readonly payerKey: web3.PublicKey;
|
|
13
|
+
private latestBlockhash;
|
|
14
|
+
readonly alts: web3.AddressLookupTableAccount[];
|
|
15
|
+
private generalUtility;
|
|
16
|
+
/** Compiled TransactionMessage which includes payer, instructions, and recent blockhash */
|
|
17
|
+
private _txMessage;
|
|
18
|
+
get txMessage(): web3.TransactionMessage;
|
|
19
|
+
/** Versioned transaction built from the transaction message */
|
|
20
|
+
private _versionedTransaction;
|
|
21
|
+
get versionedTransaction(): web3.VersionedTransaction;
|
|
22
|
+
/** A map indicating whether each required signer has signed the transaction */
|
|
23
|
+
readonly requiredSigners: Record<string, boolean>;
|
|
24
|
+
/** Estimated fee in SOL for priority fee when addPriorityFee() method is called. */
|
|
25
|
+
private _priorityFeeEstimate;
|
|
26
|
+
get priorityFeeEstimate(): string;
|
|
27
|
+
/** The blockhash of a recent ledger entry */
|
|
28
|
+
get recentBlockhash(): string;
|
|
29
|
+
/** Array of TransactionInstruction to be executed in this transaction */
|
|
30
|
+
private _instructions;
|
|
31
|
+
get instructions(): web3.TransactionInstruction[];
|
|
32
|
+
/** last valid block height */
|
|
33
|
+
get lastValidBlockHeight(): number;
|
|
34
|
+
/**
|
|
35
|
+
* Whether transaction has nonce advance instruction
|
|
36
|
+
*/
|
|
37
|
+
readonly hasNonceAdvanceIx: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Blockhash from nonce account
|
|
40
|
+
*/
|
|
41
|
+
private blockhashFromNonce;
|
|
42
|
+
/**
|
|
43
|
+
* Constructs a new Transaction object.
|
|
44
|
+
*
|
|
45
|
+
* @param payerKey PublicKey of the transaction payer
|
|
46
|
+
* @param instructions Array of TransactionInstruction to be executed in this transaction
|
|
47
|
+
* @param recentBlockhash The blockhash of a recent ledger entry
|
|
48
|
+
* @param alts Address lookup tables that optimize account address storage
|
|
49
|
+
*/
|
|
50
|
+
constructor(txMetadataResponse: TransactionMetadataResponse, payerKey: web3.PublicKey, latestBlockhash: web3.BlockhashWithExpiryBlockHeight, alts: web3.AddressLookupTableAccount[], generalUtility: GeneralUtility, _mainIxs?: web3.TransactionInstruction[]);
|
|
51
|
+
/**
|
|
52
|
+
* Generate nonde advance instruction (dummy instruction)
|
|
53
|
+
*/
|
|
54
|
+
private nonceAdvanceIx;
|
|
55
|
+
/**
|
|
56
|
+
* Replace nonce pubkey
|
|
57
|
+
*/
|
|
58
|
+
replaceNoncePubkey(noncePubkey: web3.PublicKey): void;
|
|
59
|
+
/**
|
|
60
|
+
* Get nonce index
|
|
61
|
+
*
|
|
62
|
+
* @returns
|
|
63
|
+
*/
|
|
64
|
+
private getNonceIndex;
|
|
65
|
+
/**
|
|
66
|
+
* Get blockhash from nonce pubkey
|
|
67
|
+
*/
|
|
68
|
+
private getBlockhashFromNonce;
|
|
69
|
+
/**
|
|
70
|
+
* Signs the transaction with provided signers.
|
|
71
|
+
*
|
|
72
|
+
* @param signers Array of Signer objects whose private keys will be used to sign the transaction.
|
|
73
|
+
* @param idempotent Boolean indicating whether signing should be idempotent (default is false).
|
|
74
|
+
* @throws Error if a signer is not required or has already signed the transaction when not idempotent.
|
|
75
|
+
*/
|
|
76
|
+
sign(signers: web3.Signer[], idempotent?: boolean): void;
|
|
77
|
+
/**
|
|
78
|
+
* Add a signature on the transaction with provided signature.
|
|
79
|
+
*
|
|
80
|
+
* @param publicKey The public key of the signer
|
|
81
|
+
* @param signature A signature of the signed transaction
|
|
82
|
+
* @throws Error if a signer is not required or has already signed the transaction.
|
|
83
|
+
*/
|
|
84
|
+
addSignature(publicKey: web3.PublicKey, signature: Uint8Array): void;
|
|
85
|
+
/**
|
|
86
|
+
* Checks if all required signers have signed the transaction.
|
|
87
|
+
*
|
|
88
|
+
* @returns Boolean indicating whether all required signers have signed.
|
|
89
|
+
*/
|
|
90
|
+
isSignedByRequiredSigners(): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Add priority fee instructions (compute budget) with a fixed priority fee.
|
|
93
|
+
*
|
|
94
|
+
* This method adds priority fee instructions to the transaction based on a fixed priority fee.
|
|
95
|
+
*
|
|
96
|
+
* @param connection - The connection to the Solana cluster.
|
|
97
|
+
* @param computeUnitLimit - The limit on the number of compute units.
|
|
98
|
+
* @param fixedPriority - Set to true to indicate a fixed priority fee.
|
|
99
|
+
* @param fixedPriorityFee - The fixed priority fee in lamports.
|
|
100
|
+
* @returns An array of transaction instructions.
|
|
101
|
+
*/
|
|
102
|
+
addPriorityFeeIx(connection: web3.Connection, computeUnitLimit: number, fixedPriority: true, fixedPriorityFee: number): Promise<web3.TransactionInstruction[]>;
|
|
103
|
+
/**
|
|
104
|
+
* Add priority fee instructions (compute budget) with a variable priority defined by Helius.
|
|
105
|
+
*
|
|
106
|
+
* This method adds priority fee instructions to the transaction based on the specified
|
|
107
|
+
* priority level and compute unit limit. It ensures that the total fee does not exceed
|
|
108
|
+
* the specified maximum priority fee (in SOL) if provided.
|
|
109
|
+
*
|
|
110
|
+
* @param connection - The connection to the Solana cluster.
|
|
111
|
+
* @param computeUnitLimit - The limit on the number of compute units.
|
|
112
|
+
* @param fixedPriority - Set to false to indicate a variable priority fee.
|
|
113
|
+
* @param priorityLevel - The priority level for the fee estimation.
|
|
114
|
+
* @param maxPriorityFee - The maximum priority fee in SOL (optional).
|
|
115
|
+
* @returns An array of transaction instructions.
|
|
116
|
+
*/
|
|
117
|
+
addPriorityFeeIx(connection: web3.Connection, computeUnitLimit: number, fixedPriority: false, priorityLevel: client.PriorityLevel, maxPriorityFee?: number): Promise<web3.TransactionInstruction[]>;
|
|
118
|
+
/**
|
|
119
|
+
* Gets the compute unit limit from a transaction simulation.
|
|
120
|
+
*
|
|
121
|
+
* This function simulates a transaction and calculates the compute unit limit
|
|
122
|
+
* based on the simulation results. If an additional compute limit is provided,
|
|
123
|
+
* it is added to the units consumed in the simulation. Otherwise, the units
|
|
124
|
+
* consumed are increased by 10%.
|
|
125
|
+
*
|
|
126
|
+
* @param {web3.Connection} connection - The connection object to the Solana cluster.
|
|
127
|
+
* @param {number} [additionalComputeLimit] - Optional additional compute limit to add to the units consumed.
|
|
128
|
+
* @returns {Promise<number>} - A promise that resolves to the total compute unit limit.
|
|
129
|
+
* @throws {Error} - Throws an error if the transaction simulation fails.
|
|
130
|
+
*/
|
|
131
|
+
getComputeUnitLimit(connection: web3.Connection, additionalComputeLimit?: number): Promise<number>;
|
|
132
|
+
/**
|
|
133
|
+
* Simulate transaction
|
|
134
|
+
*
|
|
135
|
+
* @param connection
|
|
136
|
+
* @returns
|
|
137
|
+
*/
|
|
138
|
+
simulateTransaction(connection: web3.Connection, signers?: web3.Keypair[]): Promise<SimulatedTransactionResponse>;
|
|
139
|
+
/**
|
|
140
|
+
* Builds transaction object
|
|
141
|
+
*/
|
|
142
|
+
buildTransaction(latestBlockhash: web3.BlockhashWithExpiryBlockHeight): [web3.TransactionMessage, web3.VersionedTransaction];
|
|
143
|
+
/**
|
|
144
|
+
* Gathers the public keys of all parties required to sign the transaction.
|
|
145
|
+
*
|
|
146
|
+
* @returns A record of signer public keys mapped to a boolean indicating whether they have signed.
|
|
147
|
+
*/
|
|
148
|
+
private getRequiredSigners;
|
|
149
|
+
/**
|
|
150
|
+
* Find setComputeUnitLimit index within the instructions
|
|
151
|
+
*/
|
|
152
|
+
private findSetComputeUnitLimitIndex;
|
|
153
|
+
/**
|
|
154
|
+
* Find setComputeUnitPrice index within the instructions
|
|
155
|
+
*/
|
|
156
|
+
private findSetComputeUnitPriceIndex;
|
|
157
|
+
/**
|
|
158
|
+
* Remove priority fee instructions
|
|
159
|
+
*/
|
|
160
|
+
private removePriorityFeeIxs;
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=Transaction%20copy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Transaction copy.d.ts","sourceRoot":"","sources":["../../../src/classes/Transaction copy.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAGxC,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;GAGG;AACH,qBAAa,WAAW;IAyDpB,QAAQ,CAAC,kBAAkB,EAAE,2BAA2B;IACxD,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS;IACjC,OAAO,CAAC,eAAe;IACvB,QAAQ,CAAC,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