@clonegod/ttd-sol-common 1.0.82 → 1.0.84
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.
|
@@ -577,8 +577,10 @@ class RpcClient {
|
|
|
577
577
|
if (solana_trade_runtime.jito_plugin_url) {
|
|
578
578
|
jitoApiUrl = solana_trade_runtime.jito_plugin_url;
|
|
579
579
|
}
|
|
580
|
+
this.sendJitoTransaction(serializedTransaction, `${types_1.JITO_API_URLS['Default']}/api/v1/transactions?bundleOnly=true`);
|
|
580
581
|
const bundleId = yield this.sendJitoBundle([serializedTransaction], jitoApiUrl);
|
|
581
|
-
(0, dist_1.log_info)(`sendJitoBundle`, {
|
|
582
|
+
(0, dist_1.log_info)(`sendJitoBundle finish`, {
|
|
583
|
+
jitoApiUrl,
|
|
582
584
|
txid,
|
|
583
585
|
bundleId
|
|
584
586
|
});
|
|
@@ -699,12 +701,13 @@ class RpcClient {
|
|
|
699
701
|
let txid = (0, get_signature_1.getSignature)(transaction);
|
|
700
702
|
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
701
703
|
const serializedTransaction = bs58_1.default.encode(transaction.serialize());
|
|
702
|
-
let jitoApiUrl = `${types_1.JITO_API_URLS[region]}/api/v1/transactions`;
|
|
704
|
+
let jitoApiUrl = `${types_1.JITO_API_URLS[region]}/api/v1/transactions?bundleOnly=true`;
|
|
703
705
|
if (solana_trade_runtime.jito_plugin_url) {
|
|
704
706
|
jitoApiUrl = solana_trade_runtime.jito_plugin_url;
|
|
705
707
|
}
|
|
706
708
|
(0, dist_1.log_info)('sendSmartTransactionWithTipMixed, start');
|
|
707
709
|
this.sendTransaction(transaction);
|
|
710
|
+
this.sendJitoTransaction(serializedTransaction, `${types_1.JITO_API_URLS['Default']}/api/v1/transactions?bundleOnly=true`);
|
|
708
711
|
const bundleId = yield this.sendJitoTransaction(serializedTransaction, jitoApiUrl);
|
|
709
712
|
(0, dist_1.log_info)(`sendJitoTransaction`, {
|
|
710
713
|
txid,
|
|
@@ -755,8 +758,12 @@ class RpcClient {
|
|
|
755
758
|
if (response.data.error) {
|
|
756
759
|
throw new Error(`Error sending bundles: ${JSON.stringify(response.data.error, null, 2)}`);
|
|
757
760
|
}
|
|
758
|
-
|
|
759
|
-
|
|
761
|
+
let bundleId = response.headers['x-bundle-id'];
|
|
762
|
+
(0, dist_1.log_info)('sendJitoTransaction finish', {
|
|
763
|
+
jitoApiUrl,
|
|
764
|
+
bundleId
|
|
765
|
+
});
|
|
766
|
+
return bundleId;
|
|
760
767
|
});
|
|
761
768
|
}
|
|
762
769
|
}
|