@clonegod/ttd-sol-common 1.0.113 → 1.0.114
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PriceMessageType, QuoteTimeInfoType, StandardPoolInfoType } from '@clonegod/ttd-common';
|
|
2
2
|
import { AppConfig } from '../appconfig';
|
|
3
3
|
export declare const get_quote_token_decimals: (pool_info: StandardPoolInfoType) => number;
|
|
4
|
-
export declare function to_price_message(appConfig: AppConfig, quote_amount_usd: number, tx_price: number, quote_ask_price: number, quote_bid_price: number, pool_info: StandardPoolInfoType, time: QuoteTimeInfoType): Promise<PriceMessageType>;
|
|
4
|
+
export declare function to_price_message(appConfig: AppConfig, quote_amount_usd: number, tx_price: number, quote_ask_price: number, quote_bid_price: number, pool_info: StandardPoolInfoType, time: QuoteTimeInfoType, slot?: string): Promise<PriceMessageType>;
|
|
5
5
|
export declare function normalize_pair_name(priceMessage: PriceMessageType): void;
|
|
@@ -30,7 +30,7 @@ const get_quote_token_decimals = (pool_info) => {
|
|
|
30
30
|
return decimals;
|
|
31
31
|
};
|
|
32
32
|
exports.get_quote_token_decimals = get_quote_token_decimals;
|
|
33
|
-
function to_price_message(appConfig, quote_amount_usd, tx_price, quote_ask_price, quote_bid_price, pool_info, time) {
|
|
33
|
+
function to_price_message(appConfig, quote_amount_usd, tx_price, quote_ask_price, quote_bid_price, pool_info, time, slot) {
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
35
|
let { pool_address, tokenA, tokenB } = pool_info;
|
|
36
36
|
let { dex_id, pool_name, fee_rate, is_reverse_token } = yield appConfig.arb_cache.get_one_pool_info(pool_address);
|
|
@@ -78,7 +78,8 @@ function to_price_message(appConfig, quote_amount_usd, tx_price, quote_ask_price
|
|
|
78
78
|
price: bid_price,
|
|
79
79
|
quantity: quote_amount_usd
|
|
80
80
|
},
|
|
81
|
-
time
|
|
81
|
+
time,
|
|
82
|
+
slot
|
|
82
83
|
};
|
|
83
84
|
normalize_pair_name(price_message);
|
|
84
85
|
return price_message;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clonegod/ttd-sol-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.114",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"push": "npm run build && npm publish"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@clonegod/ttd-common": "^1.0.
|
|
16
|
+
"@clonegod/ttd-common": "^1.0.164",
|
|
17
17
|
"@irys/sdk": "^0.2.10",
|
|
18
18
|
"@metaplex-foundation/mpl-token-metadata": "^2.5.2",
|
|
19
19
|
"@solana/web3.js": "1.91.6",
|