@gala-chain/launchpad-sdk 7.0.0 → 8.0.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@gala-chain/launchpad-sdk",
4
- "version": "7.0.0",
4
+ "version": "8.0.1",
5
5
  "description": "TypeScript SDK for Gala Launchpad Backend API - 273 public methods supporting optional wallet (read-only and full-access modes). Production-ready DeFi token launchpad integration with AgentConfig setup, GalaChain trading, GSwap DEX integration, price history, token creation, DEX pool discovery, WebSocket event watchers, streaming, chat, bans, moderator invites, and comprehensive user operations. Multi-format output (ESM, CJS, UMD).",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.esm.js",
@@ -338,15 +338,8 @@
338
338
  "debug:websocket:prod": "ENVIRONMENT=prod tsx examples/debug/websocket-monitor.ts",
339
339
  "debug:websocket:discovery": "ENVIRONMENT=stage tsx examples/debug/websocket-event-discovery.ts",
340
340
  "demo:subscribe:tokens": "ENVIRONMENT=stage tsx examples/monitoring/subscribe-token-creations.ts",
341
- "demo:subscribe:pools": "ENVIRONMENT=stage tsx examples/monitoring/subscribe-pool-creations.ts",
342
341
  "demo:subscribe:pools:integration": "ENVIRONMENT=stage tsx examples/monitoring/pool-creation-integration.ts",
343
- "demo:swap-monitor:volume": "tsx examples/swap-monitoring/volume-monitor.ts",
344
- "demo:swap-monitor:health": "tsx examples/swap-monitoring/health-monitor.ts",
345
- "demo:watch:liquidity": "tsx examples/monitoring/liquidity-monitor.ts",
346
- "demo:watch:liquidity:pool": "tsx examples/monitoring/pool-liquidity-tracker.ts",
347
342
  "demo:watch:liquidity:e2e": "tsx examples/monitoring/liquidity-e2e-test.ts",
348
- "demo:monitoring:liquidity-added": "tsx examples/monitoring/subscribe-liquidity-added.ts",
349
- "demo:monitoring:liquidity-removed": "tsx examples/monitoring/subscribe-liquidity-removed.ts",
350
343
  "demo:watch:fees:e2e": "tsx examples/monitoring/fees-collection-e2e.ts",
351
344
  "demo:watch:fees:guaranteed": "tsx examples/monitoring/fees-collection-guaranteed.ts",
352
345
  "demo:bridge:tokens": "tsx examples/bridge/supported-tokens.ts",
@@ -1,135 +0,0 @@
1
- /**
2
- * GDEX Stream Service
3
- *
4
- * A raw WebSocket JSON-RPC 2.0 client for the public gSwap real-time stream.
5
- *
6
- * @category Services
7
- * @since 5.0.4
8
- */
9
- import { LoggerBase } from './BaseService';
10
- export interface GdexStreamConfig {
11
- url?: string;
12
- reconnectAttempts?: number;
13
- reconnectDelayMs?: number;
14
- requestTimeoutMs?: number;
15
- webSocketImpl?: unknown;
16
- }
17
- export type GdexChannel = 'pool' | 'balance' | 'poolCreated' | 'swap' | 'blocks';
18
- export interface GdexPoolKey {
19
- token0ClassKey: string;
20
- token1ClassKey: string;
21
- fee: number;
22
- }
23
- export type GdexPoolSelector = {
24
- pool: GdexPoolKey;
25
- } | {
26
- poolHash: string;
27
- };
28
- export interface GdexSubscribeOptions {
29
- snapshot?: boolean;
30
- fields?: string[];
31
- }
32
- export interface GdexSubscription {
33
- subscriptionId: string;
34
- unsubscribe(): Promise<void>;
35
- }
36
- export declare class GdexStreamError extends Error {
37
- readonly code: number;
38
- readonly data?: unknown;
39
- constructor(code: number, message: string, data?: unknown);
40
- }
41
- /**
42
- * Client for gdex WebSocket Protocol v1.
43
- *
44
- * @example
45
- * ```typescript
46
- * import { getEnvironmentConfig } from '../config/environments';
47
- *
48
- * const stream = new GdexStreamService({
49
- * url: getEnvironmentConfig('stage').gdexWebSocketUrl,
50
- * });
51
- * await stream.connect();
52
- * const subscription = await stream.subscribeBlocks(console.log, { snapshot: true });
53
- * ```
54
- *
55
- * @category Services
56
- * @since 5.0.4
57
- */
58
- export declare class GdexStreamService extends LoggerBase {
59
- private readonly url;
60
- private readonly requestTimeoutMs;
61
- private readonly webSocketConstructor;
62
- private readonly reconnectionManager;
63
- private socket;
64
- private connectPromise;
65
- private nextRequestId;
66
- private readonly pending;
67
- private readonly subscriptionsByServerId;
68
- private readonly activeSubscriptions;
69
- private intentionalClose;
70
- private reconnecting;
71
- private reconnectTimer;
72
- private reconnectDelayResolve;
73
- constructor(config?: GdexStreamConfig);
74
- connect(): Promise<void>;
75
- disconnect(): void;
76
- isConnected(): boolean;
77
- /** Raw JSON-RPC escape hatch. */
78
- request<T = unknown>(method: string, params?: Record<string, unknown>): Promise<T>;
79
- serverInfo(): Promise<Record<string, unknown>>;
80
- ping(): Promise<{
81
- pong: boolean;
82
- serverTime: string;
83
- }>;
84
- getPool(selector: GdexPoolSelector): Promise<Record<string, unknown>>;
85
- getBalance(owner: string, tokenClassKey?: string): Promise<Record<string, unknown>>;
86
- getPositions(opts: {
87
- owner: string;
88
- pool?: GdexPoolKey;
89
- poolHash?: string;
90
- limit?: number;
91
- bookmark?: string;
92
- }): Promise<{
93
- positions: Record<string, unknown>[];
94
- bookmark: string;
95
- }>;
96
- getBlockHeight(): Promise<{
97
- blockNumber: number;
98
- timestamp: string;
99
- }>;
100
- quote(params: {
101
- tokenIn: string;
102
- tokenOut: string;
103
- fee?: number;
104
- amountIn?: string;
105
- amountOut?: string;
106
- }): Promise<Record<string, unknown>>;
107
- getToken(tokenClassKey: string): Promise<Record<string, unknown>>;
108
- subscribeSwaps(cb: (event: Record<string, unknown>) => void, opts?: GdexSubscribeOptions & {
109
- pool?: GdexPoolKey;
110
- poolHash?: string;
111
- transactionId?: string;
112
- }): Promise<GdexSubscription>;
113
- subscribePool(selector: GdexPoolSelector, cb: (event: Record<string, unknown>) => void, opts?: GdexSubscribeOptions): Promise<GdexSubscription>;
114
- subscribeBalances(owner: string, cb: (event: Record<string, unknown>) => void, opts?: GdexSubscribeOptions & {
115
- tokenClassKey?: string;
116
- }): Promise<GdexSubscription>;
117
- subscribePoolCreated(cb: (event: Record<string, unknown>) => void, opts?: GdexSubscribeOptions & {
118
- tokenClassKey?: string;
119
- }): Promise<GdexSubscription>;
120
- subscribeBlocks(cb: (event: Record<string, unknown>) => void, opts?: GdexSubscribeOptions): Promise<GdexSubscription>;
121
- private openSocket;
122
- private handleMessage;
123
- private subscribe;
124
- private unsubscribe;
125
- private startReconnectLoop;
126
- private reconnectLoop;
127
- private resubscribeAll;
128
- private resubscribeWithRateLimitRetry;
129
- private waitForReconnectDelay;
130
- private clearReconnectTimer;
131
- private rejectPending;
132
- private readRetryAfterMs;
133
- private isRecord;
134
- }
135
- //# sourceMappingURL=GdexStreamService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GdexStreamService.d.ts","sourceRoot":"","sources":["../../src/services/GdexStreamService.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,SAAS,GACT,aAAa,GACb,MAAM,GACN,QAAQ,CAAC;AAEb,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,gBAAgB,GAAG;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5E,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CA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