@gala-chain/launchpad-mcp-server 5.1.1 → 7.0.0-beta.1
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/README.md +57 -113
- package/dist/constants/mcpToolNames.d.ts +2 -2
- package/dist/constants/mcpToolNames.d.ts.map +1 -1
- package/dist/constants/mcpToolNames.js +1 -1
- package/dist/constants/mcpToolNames.js.map +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.d.ts.map +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/generated/version.js.map +1 -1
- package/dist/prompts/analysis.d.ts.map +1 -1
- package/dist/prompts/analysis.js +5 -13
- package/dist/prompts/analysis.js.map +1 -1
- package/dist/prompts/dex-trading.d.ts.map +1 -1
- package/dist/prompts/dex-trading.js +10 -8
- package/dist/prompts/dex-trading.js.map +1 -1
- package/dist/prompts/manifest.d.ts +2 -2
- package/dist/prompts/manifest.d.ts.map +1 -1
- package/dist/prompts/manifest.js +5 -12
- package/dist/prompts/manifest.js.map +1 -1
- package/dist/prompts/tier1-token-analysis.d.ts +0 -4
- package/dist/prompts/tier1-token-analysis.d.ts.map +1 -1
- package/dist/prompts/tier1-token-analysis.js +2 -87
- package/dist/prompts/tier1-token-analysis.js.map +1 -1
- package/dist/prompts/utility-tools.js +1 -1
- package/dist/prompts/utility-tools.js.map +1 -1
- package/dist/prompts/utility.d.ts +1 -1
- package/dist/prompts/utility.d.ts.map +1 -1
- package/dist/prompts/utility.js +7 -8
- package/dist/prompts/utility.js.map +1 -1
- package/dist/scripts/test-all-prompts.js +2 -44
- package/dist/scripts/test-all-prompts.js.map +1 -1
- package/dist/server.d.ts +4 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +13 -6
- package/dist/server.js.map +1 -1
- package/dist/tools/chat/index.d.ts +0 -14
- package/dist/tools/chat/index.d.ts.map +1 -1
- package/dist/tools/chat/index.js +1 -79
- package/dist/tools/chat/index.js.map +1 -1
- package/dist/tools/creation/index.d.ts.map +1 -1
- package/dist/tools/creation/index.js +10 -2
- package/dist/tools/creation/index.js.map +1 -1
- package/dist/tools/dex/helpers.d.ts +20 -419
- package/dist/tools/dex/helpers.d.ts.map +1 -1
- package/dist/tools/dex/helpers.js +127 -542
- package/dist/tools/dex/helpers.js.map +1 -1
- package/dist/tools/dex/index.d.ts +2 -51
- package/dist/tools/dex/index.d.ts.map +1 -1
- package/dist/tools/dex/index.js +144 -131
- package/dist/tools/dex/index.js.map +1 -1
- package/dist/tools/dex-liquidity/index.d.ts +1 -9
- package/dist/tools/dex-liquidity/index.d.ts.map +1 -1
- package/dist/tools/dex-liquidity/index.js +107 -310
- package/dist/tools/dex-liquidity/index.js.map +1 -1
- package/dist/tools/dex-pools/index.d.ts +1 -50
- package/dist/tools/dex-pools/index.d.ts.map +1 -1
- package/dist/tools/dex-pools/index.js +69 -173
- package/dist/tools/dex-pools/index.js.map +1 -1
- package/dist/tools/global-feed/getGlobalFeedStatus.d.ts.map +1 -1
- package/dist/tools/global-feed/getGlobalFeedStatus.js +2 -3
- package/dist/tools/global-feed/getGlobalFeedStatus.js.map +1 -1
- package/dist/tools/global-feed/monitorGlobalFeedEvents.d.ts.map +1 -1
- package/dist/tools/global-feed/monitorGlobalFeedEvents.js +2 -3
- package/dist/tools/global-feed/monitorGlobalFeedEvents.js.map +1 -1
- package/dist/tools/global-feed/subscribeToGlobalFeed.d.ts.map +1 -1
- package/dist/tools/global-feed/subscribeToGlobalFeed.js +3 -4
- package/dist/tools/global-feed/subscribeToGlobalFeed.js.map +1 -1
- package/dist/tools/global-feed/unsubscribeFromGlobalFeed.js +3 -3
- package/dist/tools/global-feed/unsubscribeFromGlobalFeed.js.map +1 -1
- package/dist/tools/handler-factories.d.ts +27 -15
- package/dist/tools/handler-factories.d.ts.map +1 -1
- package/dist/tools/handler-factories.js +58 -23
- package/dist/tools/handler-factories.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +16 -49
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/manifest.d.ts +3 -3
- package/dist/tools/manifest.d.ts.map +1 -1
- package/dist/tools/manifest.js +242 -98
- package/dist/tools/manifest.js.map +1 -1
- package/dist/tools/messages/getPinnedMessage.d.ts +1 -1
- package/dist/tools/messages/getPinnedMessage.js +1 -1
- package/dist/tools/messages/index.d.ts +1 -1
- package/dist/tools/messages/index.js +1 -1
- package/dist/tools/messages/pinMessage.d.ts +1 -1
- package/dist/tools/messages/pinMessage.js +1 -1
- package/dist/tools/messages/unpinMessage.d.ts +1 -1
- package/dist/tools/messages/unpinMessage.js +1 -1
- package/dist/tools/pagination-handler-factory.d.ts +6 -6
- package/dist/tools/pagination-handler-factory.js +6 -6
- package/dist/tools/pools/index.d.ts +0 -1
- package/dist/tools/pools/index.d.ts.map +1 -1
- package/dist/tools/pools/index.js +4 -11
- package/dist/tools/pools/index.js.map +1 -1
- package/dist/tools/trading/index.d.ts.map +1 -1
- package/dist/tools/trading/index.js +37 -4
- package/dist/tools/trading/index.js.map +1 -1
- package/dist/tools/utils/explainSdkUsage.d.ts +3 -104
- package/dist/tools/utils/explainSdkUsage.d.ts.map +1 -1
- package/dist/tools/utils/explainSdkUsage.js +301 -7036
- package/dist/tools/utils/explainSdkUsage.js.map +1 -1
- package/dist/tools/utils/getEnvironment.d.ts +1 -1
- package/dist/tools/utils/getEnvironment.js +2 -2
- package/dist/tools/utils/getEnvironment.js.map +1 -1
- package/dist/tools/utils/switchEnvironment.d.ts +1 -1
- package/dist/tools/utils/switchEnvironment.d.ts.map +1 -1
- package/dist/tools/utils/switchEnvironment.js +8 -5
- package/dist/tools/utils/switchEnvironment.js.map +1 -1
- package/dist/utils/error-templates.d.ts +10 -0
- package/dist/utils/error-templates.d.ts.map +1 -1
- package/dist/utils/error-templates.js +29 -1
- package/dist/utils/error-templates.js.map +1 -1
- package/dist/utils/pool-filter-builder.d.ts +1 -1
- package/dist/utils/pool-filter-builder.js +1 -1
- package/dist/utils/response-formatter.d.ts +16 -1
- package/dist/utils/response-formatter.d.ts.map +1 -1
- package/dist/utils/response-formatter.js +49 -2
- package/dist/utils/response-formatter.js.map +1 -1
- package/package.json +7 -6
- package/dist/tools/chat/getPinnedChatMessage.d.ts +0 -15
- package/dist/tools/chat/getPinnedChatMessage.d.ts.map +0 -1
- package/dist/tools/chat/getPinnedChatMessage.js +0 -37
- package/dist/tools/chat/getPinnedChatMessage.js.map +0 -1
- package/dist/tools/chat/pinChatMessage.d.ts +0 -16
- package/dist/tools/chat/pinChatMessage.d.ts.map +0 -1
- package/dist/tools/chat/pinChatMessage.js +0 -51
- package/dist/tools/chat/pinChatMessage.js.map +0 -1
- package/dist/tools/chat/unpinChatMessage.d.ts +0 -16
- package/dist/tools/chat/unpinChatMessage.d.ts.map +0 -1
- package/dist/tools/chat/unpinChatMessage.js +0 -39
- package/dist/tools/chat/unpinChatMessage.js.map +0 -1
|
@@ -1,60 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DEX Pool Discovery & Information Tools
|
|
3
|
-
*
|
|
4
|
-
* Tools for discovering and querying GalaSwap DEX liquidity pools.
|
|
5
|
-
* Provides pool listing, search, pricing, and token discovery capabilities.
|
|
6
|
-
*/
|
|
1
|
+
/** MCP tools for current-contract GSwap pool and symbol discovery. */
|
|
7
2
|
import type { MCPTool } from '../../types/mcp.js';
|
|
8
|
-
/**
|
|
9
|
-
* 1. Fetch DEX Pools (paginated)
|
|
10
|
-
*
|
|
11
|
-
* Queries the GalaSwap DEX backend for available liquidity pools with pagination,
|
|
12
|
-
* sorting, and search filtering capabilities.
|
|
13
|
-
*/
|
|
14
3
|
export declare const fetchDexPoolsTool: MCPTool;
|
|
15
|
-
/**
|
|
16
|
-
* 2. Fetch All DEX Pools (auto-paginated)
|
|
17
|
-
*
|
|
18
|
-
* Convenience tool that fetches all available DEX pools with automatic pagination.
|
|
19
|
-
* No page/limit parameters needed - returns ALL pools matching filters.
|
|
20
|
-
*/
|
|
21
4
|
export declare const fetchAllDexPoolsTool: MCPTool;
|
|
22
|
-
/**
|
|
23
|
-
* 3. Get Pool Info
|
|
24
|
-
*
|
|
25
|
-
* Get liquidity and fee tier information for a token pair on GalaSwap DEX.
|
|
26
|
-
*/
|
|
27
5
|
export declare const getSwapPoolInfoTool: MCPTool;
|
|
28
|
-
/**
|
|
29
|
-
* 4. Fetch Composite Pool Data
|
|
30
|
-
*
|
|
31
|
-
* Fetch complete pool state for offline DEX quote calculations.
|
|
32
|
-
* Returns pool liquidity, tick data, and token balances.
|
|
33
|
-
* Use this for bulk pricing operations or when you need multiple quotes for the same pool.
|
|
34
|
-
*/
|
|
35
6
|
export declare const fetchCompositePoolDataTool: MCPTool;
|
|
36
|
-
/**
|
|
37
|
-
* 5. Get Swap Pool Price
|
|
38
|
-
*
|
|
39
|
-
* Get current price, tick, and liquidity for a DEX pool.
|
|
40
|
-
* Use to check if liquidity positions are in-range.
|
|
41
|
-
*/
|
|
42
7
|
export declare const getSwapPoolPriceTool: MCPTool;
|
|
43
|
-
/**
|
|
44
|
-
* 6. Fetch Available DEX Tokens (paginated)
|
|
45
|
-
*
|
|
46
|
-
* Discover all tokens available on the DEX (paginated).
|
|
47
|
-
* Returns rich token metadata without requiring a wallet address.
|
|
48
|
-
* Use for token discovery and listing.
|
|
49
|
-
*/
|
|
50
8
|
export declare const fetchAvailableDexTokensTool: MCPTool;
|
|
51
|
-
/**
|
|
52
|
-
* 7. Fetch All Available DEX Tokens (auto-paginated)
|
|
53
|
-
*
|
|
54
|
-
* Discover ALL tokens available on the DEX (auto-paginates).
|
|
55
|
-
* Returns complete list with rich metadata.
|
|
56
|
-
* Use for comprehensive token catalogs.
|
|
57
|
-
*/
|
|
58
9
|
export declare const fetchAllAvailableDexTokensTool: MCPTool;
|
|
59
10
|
export declare const dexPoolsTools: MCPTool[];
|
|
60
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/dex-pools/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/dex-pools/index.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAqBlD,eAAO,MAAM,iBAAiB,EAAE,OAQ/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,OAUlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,OAwBjC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,OAaxC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,OAalC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,OAkBzC,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,OAY5C,CAAC;AAQF,eAAO,MAAM,aAAa,EAAE,OAAO,EAQlC,CAAC"}
|
|
@@ -1,224 +1,120 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* DEX Pool Discovery & Information Tools
|
|
4
|
-
*
|
|
5
|
-
* Tools for discovering and querying GalaSwap DEX liquidity pools.
|
|
6
|
-
* Provides pool listing, search, pricing, and token discovery capabilities.
|
|
7
|
-
*/
|
|
2
|
+
/** MCP tools for current-contract GSwap pool and symbol discovery. */
|
|
8
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
4
|
exports.dexPoolsTools = exports.fetchAllAvailableDexTokensTool = exports.fetchAvailableDexTokensTool = exports.getSwapPoolPriceTool = exports.fetchCompositePoolDataTool = exports.getSwapPoolInfoTool = exports.fetchAllDexPoolsTool = exports.fetchDexPoolsTool = void 0;
|
|
10
|
-
const handler_factories_js_1 = require("../handler-factories.js");
|
|
11
5
|
const common_schemas_js_1 = require("../../schemas/common-schemas.js");
|
|
12
|
-
const
|
|
6
|
+
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
7
|
+
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
13
8
|
const helpers_js_1 = require("../dex/helpers.js");
|
|
14
|
-
// ============================================================================
|
|
15
|
-
// POOL DISCOVERY TOOLS (2 tools)
|
|
16
|
-
// ============================================================================
|
|
17
|
-
/**
|
|
18
|
-
* 1. Fetch DEX Pools (paginated)
|
|
19
|
-
*
|
|
20
|
-
* Queries the GalaSwap DEX backend for available liquidity pools with pagination,
|
|
21
|
-
* sorting, and search filtering capabilities.
|
|
22
|
-
*/
|
|
23
9
|
exports.fetchDexPoolsTool = {
|
|
24
10
|
name: 'gala_launchpad_fetch_dex_pools',
|
|
25
|
-
description: 'Fetch
|
|
26
|
-
inputSchema: (0, common_schemas_js_1.createPoolDiscoverySchema)({
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
description: 'Fetch current-contract GSwap pools through sdk.dex.pools.getPools.',
|
|
12
|
+
inputSchema: (0, common_schemas_js_1.createPoolDiscoverySchema)({ includePagination: true, defaultPageSize: 10 }),
|
|
13
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk) => {
|
|
14
|
+
const pools = await sdk.dex.pools.getPools();
|
|
15
|
+
return (0, response_formatter_js_1.formatSuccess)({ pools: pools.map(helpers_js_1.formatPool), count: pools.length });
|
|
29
16
|
}),
|
|
30
|
-
handler: (0, handler_factories_js_1.createSimpleHandler)('fetchDexPools', (args) => ({
|
|
31
|
-
...(0, pool_filter_builder_js_1.buildDexPoolFilters)(args, { sortBy: 'tvl', sortOrder: 'desc' }),
|
|
32
|
-
cursor: args.cursor,
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- runtime defensive check
|
|
34
|
-
pageSize: args.pageSize ?? 10, // DEX pools default to 10
|
|
35
|
-
})),
|
|
36
17
|
};
|
|
37
|
-
/**
|
|
38
|
-
* 2. Fetch All DEX Pools (auto-paginated)
|
|
39
|
-
*
|
|
40
|
-
* Convenience tool that fetches all available DEX pools with automatic pagination.
|
|
41
|
-
* No page/limit parameters needed - returns ALL pools matching filters.
|
|
42
|
-
*/
|
|
43
18
|
exports.fetchAllDexPoolsTool = {
|
|
44
19
|
name: 'gala_launchpad_fetch_all_dex_pools',
|
|
45
|
-
description: 'Fetch all
|
|
20
|
+
description: 'Fetch all current-contract GSwap pools through sdk.dex.pools.getPools.',
|
|
46
21
|
inputSchema: (0, common_schemas_js_1.createPoolDiscoverySchema)({
|
|
47
|
-
additionalProperties: {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
},
|
|
22
|
+
additionalProperties: { withPrices: { type: 'boolean', description: 'Include current prices when available.' } },
|
|
23
|
+
}),
|
|
24
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk) => {
|
|
25
|
+
const pools = await sdk.dex.pools.getPools();
|
|
26
|
+
return (0, response_formatter_js_1.formatSuccess)({ pools: pools.map(helpers_js_1.formatPool), count: pools.length });
|
|
53
27
|
}),
|
|
54
|
-
handler: (0, handler_factories_js_1.createSimpleHandler)('fetchAllDexPools', (args) => (0, pool_filter_builder_js_1.buildDexPoolFilters)(args, { sortBy: 'tvl', sortOrder: 'desc' })),
|
|
55
28
|
};
|
|
56
|
-
// ============================================================================
|
|
57
|
-
// POOL INFORMATION TOOLS (3 tools)
|
|
58
|
-
// ============================================================================
|
|
59
|
-
/**
|
|
60
|
-
* 3. Get Pool Info
|
|
61
|
-
*
|
|
62
|
-
* Get liquidity and fee tier information for a token pair on GalaSwap DEX.
|
|
63
|
-
*/
|
|
64
29
|
exports.getSwapPoolInfoTool = {
|
|
65
30
|
name: 'gala_launchpad_get_swap_pool_info',
|
|
66
|
-
description: 'Get
|
|
31
|
+
description: 'Get current-contract GSwap pool information for a token pair.',
|
|
67
32
|
inputSchema: {
|
|
68
33
|
type: 'object',
|
|
69
|
-
properties: {
|
|
70
|
-
tokenA: common_schemas_js_1.DEX_TOKEN_SYMBOL_SCHEMA,
|
|
71
|
-
tokenB: common_schemas_js_1.DEX_TOKEN_SYMBOL_SCHEMA,
|
|
72
|
-
},
|
|
34
|
+
properties: { tokenA: common_schemas_js_1.DEX_TOKEN_SYMBOL_SCHEMA, tokenB: common_schemas_js_1.DEX_TOKEN_SYMBOL_SCHEMA },
|
|
73
35
|
required: ['tokenA', 'tokenB'],
|
|
74
36
|
},
|
|
75
|
-
handler: (0,
|
|
76
|
-
tokenA
|
|
77
|
-
tokenB
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
37
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
38
|
+
const tokenA = requiredString(args, 'tokenA');
|
|
39
|
+
const tokenB = requiredString(args, 'tokenB');
|
|
40
|
+
const pools = await sdk.dex.pools.getPools();
|
|
41
|
+
const matches = pools.filter((pool) => (pool.token0 === tokenA && pool.token1 === tokenB) ||
|
|
42
|
+
(pool.token0 === tokenB && pool.token1 === tokenA));
|
|
43
|
+
return (0, response_formatter_js_1.formatSuccess)({
|
|
44
|
+
tokenA,
|
|
45
|
+
tokenB,
|
|
46
|
+
pools: matches.map(helpers_js_1.formatPool),
|
|
47
|
+
feeTiers: (0, helpers_js_1.formatFeeTiersPercent)(matches.map((pool) => pool.fee)),
|
|
48
|
+
message: `${matches.length} GSwap pools found for ${tokenA}/${tokenB}.`,
|
|
49
|
+
});
|
|
50
|
+
}),
|
|
84
51
|
};
|
|
85
|
-
/**
|
|
86
|
-
* 4. Fetch Composite Pool Data
|
|
87
|
-
*
|
|
88
|
-
* Fetch complete pool state for offline DEX quote calculations.
|
|
89
|
-
* Returns pool liquidity, tick data, and token balances.
|
|
90
|
-
* Use this for bulk pricing operations or when you need multiple quotes for the same pool.
|
|
91
|
-
*/
|
|
92
52
|
exports.fetchCompositePoolDataTool = {
|
|
93
53
|
name: 'gala_launchpad_fetch_composite_pool_data',
|
|
94
|
-
description: 'Fetch
|
|
54
|
+
description: 'Fetch a current-contract GSwap composite pool snapshot through sdk.dex.pools.getCompositePool.',
|
|
95
55
|
inputSchema: {
|
|
96
56
|
type: 'object',
|
|
97
|
-
properties: {
|
|
98
|
-
token0: {
|
|
99
|
-
...common_schemas_js_1.DEX_TOKEN_CLASS_KEY_SCHEMA,
|
|
100
|
-
description: 'First token class key (e.g., "GALA|Unit|none|none").',
|
|
101
|
-
},
|
|
102
|
-
token1: {
|
|
103
|
-
...common_schemas_js_1.DEX_TOKEN_CLASS_KEY_SCHEMA,
|
|
104
|
-
description: 'Second token class key (e.g., "Token|Unit|BENE|client:5c806869e7fd0e2384461ce9").',
|
|
105
|
-
},
|
|
106
|
-
fee: common_schemas_js_1.FEE_TIER_SCHEMA,
|
|
107
|
-
},
|
|
57
|
+
properties: { token0: common_schemas_js_1.DEX_TOKEN_CLASS_KEY_SCHEMA, token1: common_schemas_js_1.DEX_TOKEN_CLASS_KEY_SCHEMA, fee: common_schemas_js_1.FEE_TIER_SCHEMA },
|
|
108
58
|
required: ['token0', 'token1', 'fee'],
|
|
109
59
|
},
|
|
110
|
-
handler: (0,
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
token0Decimals: composite.token0Decimals,
|
|
115
|
-
token1Decimals: composite.token1Decimals,
|
|
116
|
-
poolLiquidity: composite.pool.liquidity.toString(),
|
|
117
|
-
tick: composite.pool.tick,
|
|
118
|
-
sqrtPrice: composite.pool.sqrtPrice.toString(),
|
|
119
|
-
tickDataCount: Object.keys(composite.tickDataMap).length,
|
|
120
|
-
message: `Composite pool data fetched for ${params.token0}/${params.token1} (${(0, helpers_js_1.formatFeeTierPercent)(params.fee)} fee).`,
|
|
121
|
-
};
|
|
60
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
61
|
+
const { token0, token1, fee } = (0, helpers_js_1.extractTokenPairParams)(args);
|
|
62
|
+
const composite = await sdk.dex.pools.getCompositePool(token0, token1, fee);
|
|
63
|
+
return (0, response_formatter_js_1.formatSuccess)({ token0, token1, fee, composite });
|
|
122
64
|
}),
|
|
123
65
|
};
|
|
124
|
-
/**
|
|
125
|
-
* 5. Get Swap Pool Price
|
|
126
|
-
*
|
|
127
|
-
* Get current price, tick, and liquidity for a DEX pool.
|
|
128
|
-
* Use to check if liquidity positions are in-range.
|
|
129
|
-
*/
|
|
130
66
|
exports.getSwapPoolPriceTool = {
|
|
131
67
|
name: 'gala_launchpad_get_swap_pool_price',
|
|
132
|
-
description: 'Get
|
|
68
|
+
description: 'Get current-contract GSwap price state through sdk.dex.pools.getSlot0.',
|
|
133
69
|
inputSchema: {
|
|
134
70
|
type: 'object',
|
|
135
|
-
properties: {
|
|
136
|
-
token0: common_schemas_js_1.DEX_TOKEN_SYMBOL_SCHEMA,
|
|
137
|
-
token1: common_schemas_js_1.DEX_TOKEN_SYMBOL_SCHEMA,
|
|
138
|
-
fee: common_schemas_js_1.FEE_TIER_SCHEMA,
|
|
139
|
-
},
|
|
71
|
+
properties: { token0: common_schemas_js_1.DEX_TOKEN_SYMBOL_SCHEMA, token1: common_schemas_js_1.DEX_TOKEN_SYMBOL_SCHEMA, fee: common_schemas_js_1.FEE_TIER_SCHEMA },
|
|
140
72
|
required: ['token0', 'token1', 'fee'],
|
|
141
73
|
},
|
|
142
|
-
handler: (0,
|
|
143
|
-
const { token0, token1, fee } = (0, helpers_js_1.extractTokenPairParams)(args);
|
|
144
|
-
return [token0, token1, fee];
|
|
145
|
-
}, (priceData, args) => {
|
|
74
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
146
75
|
const { token0, token1, fee } = (0, helpers_js_1.extractTokenPairParams)(args);
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
token1,
|
|
150
|
-
fee,
|
|
151
|
-
price: priceData.price,
|
|
152
|
-
tick: priceData.tick,
|
|
153
|
-
liquidity: priceData.liquidity,
|
|
154
|
-
message: `Pool price: ${priceData.price} ${token1} per ${token0} (tick: ${priceData.tick}).`,
|
|
155
|
-
};
|
|
76
|
+
const slot0 = await sdk.dex.pools.getSlot0(token0, token1, fee);
|
|
77
|
+
return (0, response_formatter_js_1.formatSuccess)({ ...(0, helpers_js_1.formatSlot0)(slot0), feePercent: (0, helpers_js_1.formatFeeTierPercent)(fee) });
|
|
156
78
|
}),
|
|
157
79
|
};
|
|
158
|
-
// ============================================================================
|
|
159
|
-
// TOKEN DISCOVERY TOOLS (2 tools)
|
|
160
|
-
// ============================================================================
|
|
161
|
-
/**
|
|
162
|
-
* 6. Fetch Available DEX Tokens (paginated)
|
|
163
|
-
*
|
|
164
|
-
* Discover all tokens available on the DEX (paginated).
|
|
165
|
-
* Returns rich token metadata without requiring a wallet address.
|
|
166
|
-
* Use for token discovery and listing.
|
|
167
|
-
*/
|
|
168
80
|
exports.fetchAvailableDexTokensTool = {
|
|
169
81
|
name: 'gala_launchpad_fetch_available_dex_tokens',
|
|
170
|
-
description: '
|
|
82
|
+
description: 'List registered GSwap trading symbols through sdk.dex.symbols.list.',
|
|
171
83
|
inputSchema: {
|
|
172
84
|
type: 'object',
|
|
173
|
-
properties: {
|
|
174
|
-
search: common_schemas_js_1.SEARCH_SCHEMA,
|
|
175
|
-
pageSize: (0, common_schemas_js_1.createPageSizeSchema)('pool', 20),
|
|
176
|
-
cursor: common_schemas_js_1.CURSOR_SCHEMA,
|
|
177
|
-
},
|
|
85
|
+
properties: { search: common_schemas_js_1.SEARCH_SCHEMA, pageSize: (0, common_schemas_js_1.createPageSizeSchema)('pool', 20), cursor: common_schemas_js_1.CURSOR_SCHEMA },
|
|
178
86
|
required: [],
|
|
179
87
|
},
|
|
180
|
-
handler: (0,
|
|
181
|
-
search
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
hasMore:
|
|
189
|
-
|
|
190
|
-
message: `Found ${result.tokens.length} tokens (page ${result.page}, ${result.count} total)${result.hasMore ? ' - more pages available' : ''}`,
|
|
191
|
-
})),
|
|
88
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
89
|
+
const search = typeof args.search === 'string' ? args.search.toLowerCase() : undefined;
|
|
90
|
+
const allTokens = await sdk.dex.symbols.list();
|
|
91
|
+
const filtered = search === undefined
|
|
92
|
+
? allTokens
|
|
93
|
+
: allTokens.filter((token) => token.symbol.toLowerCase().includes(search));
|
|
94
|
+
const pageSize = typeof args.pageSize === 'number' ? args.pageSize : 20;
|
|
95
|
+
const page = filtered.slice(0, pageSize);
|
|
96
|
+
return (0, response_formatter_js_1.formatSuccess)({ count: filtered.length, page: 1, limit: page.length, hasMore: page.length < filtered.length, tokens: (0, helpers_js_1.mapTokenMetadataArray)(page) });
|
|
97
|
+
}),
|
|
192
98
|
};
|
|
193
|
-
/**
|
|
194
|
-
* 7. Fetch All Available DEX Tokens (auto-paginated)
|
|
195
|
-
*
|
|
196
|
-
* Discover ALL tokens available on the DEX (auto-paginates).
|
|
197
|
-
* Returns complete list with rich metadata.
|
|
198
|
-
* Use for comprehensive token catalogs.
|
|
199
|
-
*/
|
|
200
99
|
exports.fetchAllAvailableDexTokensTool = {
|
|
201
100
|
name: 'gala_launchpad_fetch_all_available_dex_tokens',
|
|
202
|
-
description: '
|
|
203
|
-
inputSchema: {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}), (tokens) => ({
|
|
213
|
-
tokenCount: tokens.length,
|
|
214
|
-
tokens: (0, helpers_js_1.mapTokenMetadataArray)(tokens),
|
|
215
|
-
message: `Found ${tokens.length} total tokens available on the DEX.`,
|
|
216
|
-
})),
|
|
101
|
+
description: 'List all registered GSwap trading symbols through sdk.dex.symbols.list.',
|
|
102
|
+
inputSchema: { type: 'object', properties: { search: common_schemas_js_1.SEARCH_SCHEMA }, required: [] },
|
|
103
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
104
|
+
const search = typeof args.search === 'string' ? args.search.toLowerCase() : undefined;
|
|
105
|
+
const tokens = await sdk.dex.symbols.list();
|
|
106
|
+
const filtered = search === undefined
|
|
107
|
+
? tokens
|
|
108
|
+
: tokens.filter((token) => token.symbol.toLowerCase().includes(search));
|
|
109
|
+
return (0, response_formatter_js_1.formatSuccess)({ tokenCount: filtered.length, tokens: (0, helpers_js_1.mapTokenMetadataArray)(filtered) });
|
|
110
|
+
}),
|
|
217
111
|
};
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
112
|
+
function requiredString(args, name) {
|
|
113
|
+
const value = args[name];
|
|
114
|
+
if (typeof value !== 'string' || value.trim() === '')
|
|
115
|
+
throw new Error(`${name} must be a non-empty string`);
|
|
116
|
+
return value;
|
|
117
|
+
}
|
|
222
118
|
exports.dexPoolsTools = [
|
|
223
119
|
exports.fetchDexPoolsTool,
|
|
224
120
|
exports.fetchAllDexPoolsTool,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/dex-pools/index.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/dex-pools/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;;;AAGtE,uEAQyC;AACzC,6EAAkE;AAClE,mEAAiE;AACjE,kDAO2B;AAEd,QAAA,iBAAiB,GAAY;IACxC,IAAI,EAAE,gCAAgC;IACtC,WAAW,EAAE,oEAAoE;IACjF,WAAW,EAAE,IAAA,6CAAyB,EAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC;IACxF,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACvC,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC7C,OAAO,IAAA,qCAAa,EAAC,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,uBAAU,CAAC,EAA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GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,
|
|
1
|
+
{"version":3,"file":"getGlobalFeedStatus.d.ts","sourceRoot":"","sources":["../../../src/tools/global-feed/getGlobalFeedStatus.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,OA8ErC,CAAC"}
|
|
@@ -73,7 +73,7 @@ console.log(\`Connection status: \${isConnected ? 'connected' : 'disconnected'}\
|
|
|
73
73
|
Full guides available in the SDK:
|
|
74
74
|
- Quick Start (5 min): docs/websocket/QUICKSTART.md
|
|
75
75
|
- Complete Guide: docs/websocket/GLOBAL-FEED.md
|
|
76
|
-
-
|
|
76
|
+
- Example: examples/websocket-events-demo.ts
|
|
77
77
|
|
|
78
78
|
${handler_factories_js_1.AUTH_DESCRIPTIONS.PUBLIC}`,
|
|
79
79
|
inputSchema: {
|
|
@@ -86,8 +86,7 @@ ${handler_factories_js_1.AUTH_DESCRIPTIONS.PUBLIC}`,
|
|
|
86
86
|
documentationType: 'global-feed-status-reference',
|
|
87
87
|
location: 'docs/websocket/',
|
|
88
88
|
examples: [
|
|
89
|
-
'examples/
|
|
90
|
-
'examples/global-feed-filtering-demo.ts',
|
|
89
|
+
'examples/websocket-events-demo.ts',
|
|
91
90
|
],
|
|
92
91
|
nextSteps: [
|
|
93
92
|
'Use useGlobalFeed hook in React or StreamWebSocketService in vanilla JS',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getGlobalFeedStatus.js","sourceRoot":"","sources":["../../../src/tools/global-feed/getGlobalFeedStatus.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAGH,kEAA4D;AAC5D,mEAAiE;AACjE,6EAAkE;AAElE;;;;GAIG;AACU,QAAA,uBAAuB,GAAY;IAC9C,IAAI,EAAE,6CAA6C;IACnD,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDb,wCAAiB,CAAC,MAAM,EAAE;IAC1B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;KACb;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,IAAI,EAAE;QACpC,OAAO,IAAA,qCAAa,EAAC;YACnB,iBAAiB,EAAE,8BAA8B;YACjD,QAAQ,EAAE,iBAAiB;YAC3B,QAAQ,EAAE;gBACR,
|
|
1
|
+
{"version":3,"file":"getGlobalFeedStatus.js","sourceRoot":"","sources":["../../../src/tools/global-feed/getGlobalFeedStatus.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAGH,kEAA4D;AAC5D,mEAAiE;AACjE,6EAAkE;AAElE;;;;GAIG;AACU,QAAA,uBAAuB,GAAY;IAC9C,IAAI,EAAE,6CAA6C;IACnD,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDb,wCAAiB,CAAC,MAAM,EAAE;IAC1B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;KACb;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,IAAI,EAAE;QACpC,OAAO,IAAA,qCAAa,EAAC;YACnB,iBAAiB,EAAE,8BAA8B;YACjD,QAAQ,EAAE,iBAAiB;YAC3B,QAAQ,EAAE;gBACR,mCAAmC;aACpC;YACD,SAAS,EAAE;gBACT,yEAAyE;gBACzE,+CAA+C;gBAC/C,wDAAwD;aACzD;SACF,CAAC,CAAC;IACL,CAAC,CAAC;CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitorGlobalFeedEvents.d.ts","sourceRoot":"","sources":["../../../src/tools/global-feed/monitorGlobalFeedEvents.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,EAAE,
|
|
1
|
+
{"version":3,"file":"monitorGlobalFeedEvents.d.ts","sourceRoot":"","sources":["../../../src/tools/global-feed/monitorGlobalFeedEvents.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,EAAE,OA4IzC,CAAC"}
|
|
@@ -135,7 +135,7 @@ socket.on('stream_global_status', (data) => {
|
|
|
135
135
|
Full guides available in the SDK:
|
|
136
136
|
- Quick Start (5 min): docs/websocket/QUICKSTART.md
|
|
137
137
|
- Complete Guide: docs/websocket/GLOBAL-FEED.md
|
|
138
|
-
-
|
|
138
|
+
- Example: examples/websocket-events-demo.ts
|
|
139
139
|
|
|
140
140
|
${handler_factories_js_1.AUTH_DESCRIPTIONS.PUBLIC}`,
|
|
141
141
|
inputSchema: {
|
|
@@ -148,8 +148,7 @@ ${handler_factories_js_1.AUTH_DESCRIPTIONS.PUBLIC}`,
|
|
|
148
148
|
documentationType: 'monitor-global-feed-events-reference',
|
|
149
149
|
location: 'docs/websocket/',
|
|
150
150
|
examples: [
|
|
151
|
-
'examples/
|
|
152
|
-
'examples/global-feed-filtering-demo.ts',
|
|
151
|
+
'examples/websocket-events-demo.ts',
|
|
153
152
|
],
|
|
154
153
|
nextSteps: [
|
|
155
154
|
'Use useGlobalFeedFiltered hook in React with tokenNames and eventTypes filters',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitorGlobalFeedEvents.js","sourceRoot":"","sources":["../../../src/tools/global-feed/monitorGlobalFeedEvents.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAGH,kEAA4D;AAC5D,mEAAiE;AACjE,6EAAkE;AAElE;;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pC;YACD,SAAS,EAAE;gBACT,gFAAgF;gBAChF,2EAA2E;gBAC3E,kDAAkD;aACnD;SACF,CAAC,CAAC;IACL,CAAC,CAAC;CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribeToGlobalFeed.d.ts","sourceRoot":"","sources":["../../../src/tools/global-feed/subscribeToGlobalFeed.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,EAAE,
|
|
1
|
+
{"version":3,"file":"subscribeToGlobalFeed.d.ts","sourceRoot":"","sources":["../../../src/tools/global-feed/subscribeToGlobalFeed.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,EAAE,OAuFvC,CAAC"}
|
|
@@ -81,7 +81,7 @@ Full guides available in the SDK:
|
|
|
81
81
|
- Quick Start (5 min): docs/websocket/QUICKSTART.md
|
|
82
82
|
- Complete Guide: docs/websocket/GLOBAL-FEED.md
|
|
83
83
|
- Authentication: docs/websocket/AUTHENTICATION.md
|
|
84
|
-
-
|
|
84
|
+
- Example: examples/websocket-events-demo.ts
|
|
85
85
|
|
|
86
86
|
${handler_factories_js_1.AUTH_DESCRIPTIONS.PUBLIC}`,
|
|
87
87
|
inputSchema: {
|
|
@@ -94,14 +94,13 @@ ${handler_factories_js_1.AUTH_DESCRIPTIONS.PUBLIC}`,
|
|
|
94
94
|
documentationType: 'global-feed-reference',
|
|
95
95
|
location: 'docs/websocket/',
|
|
96
96
|
examples: [
|
|
97
|
-
'examples/
|
|
98
|
-
'examples/global-feed-filtering-demo.ts',
|
|
97
|
+
'examples/websocket-events-demo.ts',
|
|
99
98
|
'examples/site-config-demo.ts',
|
|
100
99
|
],
|
|
101
100
|
nextSteps: [
|
|
102
101
|
'Read docs/websocket/QUICKSTART.md to get started in 5 minutes',
|
|
103
102
|
'Check docs/websocket/GLOBAL-FEED.md for comprehensive guide',
|
|
104
|
-
'Review examples/
|
|
103
|
+
'Review examples/websocket-events-demo.ts for working code',
|
|
105
104
|
'Use React hooks (useGlobalFeed, useGlobalFeedFiltered) or StreamWebSocketService directly',
|
|
106
105
|
],
|
|
107
106
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribeToGlobalFeed.js","sourceRoot":"","sources":["../../../src/tools/global-feed/subscribeToGlobalFeed.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAGH,kEAA4D;AAC5D,mEAAiE;AACjE,6EAAkE;AAElE;;;;;GAKG;AACU,QAAA,yBAAyB,GAAY;IAChD,IAAI,EAAE,sCAAsC;IAC5C,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+Db,wCAAiB,CAAC,MAAM,EAAE;IAC1B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;KACb;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,IAAI,EAAE;QACpC,OAAO,IAAA,qCAAa,EAAC;YACnB,iBAAiB,EAAE,uBAAuB;YAC1C,QAAQ,EAAE,iBAAiB;YAC3B,QAAQ,EAAE;gBACR,
|
|
1
|
+
{"version":3,"file":"subscribeToGlobalFeed.js","sourceRoot":"","sources":["../../../src/tools/global-feed/subscribeToGlobalFeed.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAGH,kEAA4D;AAC5D,mEAAiE;AACjE,6EAAkE;AAElE;;;;;GAKG;AACU,QAAA,yBAAyB,GAAY;IAChD,IAAI,EAAE,sCAAsC;IAC5C,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+Db,wCAAiB,CAAC,MAAM,EAAE;IAC1B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;KACb;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,IAAI,EAAE;QACpC,OAAO,IAAA,qCAAa,EAAC;YACnB,iBAAiB,EAAE,uBAAuB;YAC1C,QAAQ,EAAE,iBAAiB;YAC3B,QAAQ,EAAE;gBACR,mCAAmC;gBACnC,8BAA8B;aAC/B;YACD,SAAS,EAAE;gBACT,+DAA+D;gBAC/D,6DAA6D;gBAC7D,2DAA2D;gBAC3D,2FAA2F;aAC5F;SACF,CAAC,CAAC;IACL,CAAC,CAAC;CACH,CAAC"}
|
|
@@ -127,7 +127,7 @@ await service.disconnect(); // Unsubscribes from all rooms
|
|
|
127
127
|
Full guides available in the SDK:
|
|
128
128
|
- Quick Start (5 min): docs/websocket/QUICKSTART.md
|
|
129
129
|
- Complete Guide: docs/websocket/GLOBAL-FEED.md
|
|
130
|
-
-
|
|
130
|
+
- Example: examples/websocket-events-demo.ts
|
|
131
131
|
|
|
132
132
|
${handler_factories_js_1.AUTH_DESCRIPTIONS.PUBLIC}`,
|
|
133
133
|
inputSchema: {
|
|
@@ -139,11 +139,11 @@ ${handler_factories_js_1.AUTH_DESCRIPTIONS.PUBLIC}`,
|
|
|
139
139
|
return (0, response_formatter_js_1.formatSuccess)({
|
|
140
140
|
documentationType: 'unsubscribe-from-global-feed-reference',
|
|
141
141
|
location: 'docs/websocket/',
|
|
142
|
-
examples: ['examples/
|
|
142
|
+
examples: ['examples/websocket-events-demo.ts'],
|
|
143
143
|
nextSteps: [
|
|
144
144
|
'In React: Use cleanup function in useEffect to unsubscribe on unmount',
|
|
145
145
|
'In vanilla JS: Call unsubscribeFromGlobalFeed() and then disconnect()',
|
|
146
|
-
'Review examples/
|
|
146
|
+
'Review examples/websocket-events-demo.ts for complete lifecycle patterns',
|
|
147
147
|
],
|
|
148
148
|
});
|
|
149
149
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unsubscribeFromGlobalFeed.js","sourceRoot":"","sources":["../../../src/tools/global-feed/unsubscribeFromGlobalFeed.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAGH,kEAA4D;AAC5D,mEAAiE;AACjE,6EAAkE;AAElE;;;;GAIG;AACU,QAAA,6BAA6B,GAAY;IACpD,IAAI,EAAE,uDAAuD;IAC7D,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8Gb,wCAAiB,CAAC,MAAM,EAAE;IAC1B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;KACb;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,IAAI,EAAE;QACpC,OAAO,IAAA,qCAAa,EAAC;YACnB,iBAAiB,EAAE,wCAAwC;YAC3D,QAAQ,EAAE,iBAAiB;YAC3B,QAAQ,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"unsubscribeFromGlobalFeed.js","sourceRoot":"","sources":["../../../src/tools/global-feed/unsubscribeFromGlobalFeed.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAGH,kEAA4D;AAC5D,mEAAiE;AACjE,6EAAkE;AAElE;;;;GAIG;AACU,QAAA,6BAA6B,GAAY;IACpD,IAAI,EAAE,uDAAuD;IAC7D,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8Gb,wCAAiB,CAAC,MAAM,EAAE;IAC1B,WAAW,EAAE;Q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