@clonegod/ttd-sol-common 1.0.22 → 1.0.23
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.
|
@@ -8,7 +8,7 @@ export declare class HeliusClient {
|
|
|
8
8
|
helius_mainnet: Helius;
|
|
9
9
|
helius_staked: Helius;
|
|
10
10
|
trade_runtime: SolanaTradeRuntimeType;
|
|
11
|
-
constructor(signers: Signer[]);
|
|
11
|
+
constructor(signers: Signer[], trade_runtime: SolanaTradeRuntimeType);
|
|
12
12
|
send_transaction(instructions: TransactionInstruction[]): Promise<string>;
|
|
13
13
|
private send_smart_transaction;
|
|
14
14
|
private send_transaction_by_jito;
|
package/dist/send_transaction.js
CHANGED
|
@@ -14,16 +14,17 @@ const dist_1 = require("@clonegod/ttd-common/dist");
|
|
|
14
14
|
const helius_sdk_v1_4_0_1 = require("./helius_sdk_v1.4.0");
|
|
15
15
|
const strategy_util_1 = require("./strategy_util");
|
|
16
16
|
class HeliusClient {
|
|
17
|
-
constructor(signers) {
|
|
17
|
+
constructor(signers, trade_runtime) {
|
|
18
18
|
this.cluster = 'mainnet-beta';
|
|
19
|
-
let helius_api_key = process.env.HELIUS_API_KEY;
|
|
20
|
-
let helius_mainnet_endpoint = `https://mainnet.helius-rpc.com/?api-key=${helius_api_key}`;
|
|
21
|
-
let helius_staked_endpoint = `https://staked.helius-rpc.com?api-key=${helius_api_key}`;
|
|
22
19
|
this.signers = signers;
|
|
20
|
+
this.trade_runtime = trade_runtime;
|
|
23
21
|
this.sendOptions = {
|
|
24
22
|
skipPreflight: true,
|
|
25
23
|
maxRetries: 0
|
|
26
24
|
};
|
|
25
|
+
let helius_api_key = process.env.HELIUS_API_KEY;
|
|
26
|
+
let helius_mainnet_endpoint = `https://mainnet.helius-rpc.com/?api-key=${helius_api_key}`;
|
|
27
|
+
let helius_staked_endpoint = `https://staked.helius-rpc.com?api-key=${helius_api_key}`;
|
|
27
28
|
this.helius_mainnet = new helius_sdk_v1_4_0_1.Helius('', this.cluster, 'helius-sdk', helius_mainnet_endpoint, this.trade_runtime);
|
|
28
29
|
this.helius_staked = new helius_sdk_v1_4_0_1.Helius('', this.cluster, 'helius-sdk', helius_staked_endpoint, this.trade_runtime);
|
|
29
30
|
}
|