@gala-chain/launchpad-sdk 7.0.0-beta.6 → 8.0.0
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/EXAMPLES.md +2 -15
- package/LICENSE +21 -0
- package/dist/LaunchpadSDK.d.ts +0 -12
- package/dist/LaunchpadSDK.d.ts.map +1 -1
- package/dist/config/environments.d.ts +0 -2
- package/dist/config/environments.d.ts.map +1 -1
- package/dist/constants/version.generated.d.ts +1 -1
- package/dist/constants/version.generated.d.ts.map +1 -1
- package/dist/index.browser.d.ts +0 -1
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.esm.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/native.cjs +1 -1
- package/dist/native.esm.js +1 -1
- package/package.json +159 -166
- package/dist/services/GdexStreamService.d.ts +0 -135
- package/dist/services/GdexStreamService.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@gala-chain/launchpad-sdk",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "8.0.0",
|
|
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",
|
|
@@ -54,6 +54,163 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"sideEffects": false,
|
|
57
|
+
"keywords": [
|
|
58
|
+
"gala",
|
|
59
|
+
"galachain",
|
|
60
|
+
"launchpad",
|
|
61
|
+
"defi",
|
|
62
|
+
"blockchain",
|
|
63
|
+
"ethereum",
|
|
64
|
+
"token",
|
|
65
|
+
"trading",
|
|
66
|
+
"sdk",
|
|
67
|
+
"typescript",
|
|
68
|
+
"api-client",
|
|
69
|
+
"crypto",
|
|
70
|
+
"web3",
|
|
71
|
+
"wallet",
|
|
72
|
+
"optional-wallet",
|
|
73
|
+
"read-only-mode",
|
|
74
|
+
"signature-auth",
|
|
75
|
+
"bonding-curve",
|
|
76
|
+
"token-creation",
|
|
77
|
+
"price-history",
|
|
78
|
+
"portfolio",
|
|
79
|
+
"comments",
|
|
80
|
+
"mcp",
|
|
81
|
+
"ai-agent",
|
|
82
|
+
"automation",
|
|
83
|
+
"agent-sdk",
|
|
84
|
+
"model-context-protocol",
|
|
85
|
+
"dex-trading",
|
|
86
|
+
"token-graduation"
|
|
87
|
+
],
|
|
88
|
+
"author": {
|
|
89
|
+
"name": "Gala Launchpad Team",
|
|
90
|
+
"email": "dev@gala-launchpad.com",
|
|
91
|
+
"url": "https://gala-launchpad.com"
|
|
92
|
+
},
|
|
93
|
+
"license": "MIT",
|
|
94
|
+
"repository": {
|
|
95
|
+
"type": "git",
|
|
96
|
+
"url": "https://gitlab.com/gala-games/defi/launchpad/sdk.git"
|
|
97
|
+
},
|
|
98
|
+
"bugs": {
|
|
99
|
+
"url": "https://gitlab.com/gala-games/defi/launchpad/sdk/-/issues"
|
|
100
|
+
},
|
|
101
|
+
"homepage": "https://gitlab.com/gala-games/defi/launchpad/sdk#readme",
|
|
102
|
+
"engines": {
|
|
103
|
+
"node": ">=20.0.0",
|
|
104
|
+
"npm": ">=10.0.0"
|
|
105
|
+
},
|
|
106
|
+
"publishConfig": {
|
|
107
|
+
"access": "public",
|
|
108
|
+
"registry": "https://registry.npmjs.org/"
|
|
109
|
+
},
|
|
110
|
+
"peerDependencies": {
|
|
111
|
+
"@gala-chain/api": "^3.3.0",
|
|
112
|
+
"axios": "^1.20.0",
|
|
113
|
+
"bignumber.js": "^11.1.5",
|
|
114
|
+
"ethers": "^6.16.0",
|
|
115
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
116
|
+
"socket.io-client": "^4.8.3",
|
|
117
|
+
"zod": "^3.25.76"
|
|
118
|
+
},
|
|
119
|
+
"peerDependenciesMeta": {
|
|
120
|
+
"react": {
|
|
121
|
+
"optional": true
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"browserslist": [
|
|
125
|
+
"> 1%",
|
|
126
|
+
"last 2 versions",
|
|
127
|
+
"not dead",
|
|
128
|
+
"not ie 11"
|
|
129
|
+
],
|
|
130
|
+
"dependencies": {
|
|
131
|
+
"@gala-chain/api": "^3.3.0",
|
|
132
|
+
"@gala-chain/gswap-sdk": "^1.0.0",
|
|
133
|
+
"@modelcontextprotocol/sdk": "^1.30.1",
|
|
134
|
+
"@solana/spl-token": "^0.4.15",
|
|
135
|
+
"@solana/web3.js": "^1.99.0",
|
|
136
|
+
"axios": "^1.20.0",
|
|
137
|
+
"bignumber.js": "^11.1.5",
|
|
138
|
+
"bs58": "^6.0.0",
|
|
139
|
+
"dotenv": "^18.0.3",
|
|
140
|
+
"ethers": "^6.16.0",
|
|
141
|
+
"json-stringify-deterministic": "^1.0.16",
|
|
142
|
+
"socket.io-client": "^4.8.3",
|
|
143
|
+
"uuid": "^14.0.2",
|
|
144
|
+
"web-file-polyfill": "^1.0.4",
|
|
145
|
+
"zod": "^4.3.6"
|
|
146
|
+
},
|
|
147
|
+
"size-limit": [
|
|
148
|
+
{
|
|
149
|
+
"path": "./dist/index.browser.esm.js",
|
|
150
|
+
"limit": "500 kB",
|
|
151
|
+
"ignore": [
|
|
152
|
+
"ethers",
|
|
153
|
+
"socket.io-client",
|
|
154
|
+
"bignumber.js",
|
|
155
|
+
"axios",
|
|
156
|
+
"uuid",
|
|
157
|
+
"zod",
|
|
158
|
+
"dotenv",
|
|
159
|
+
"events",
|
|
160
|
+
"crypto",
|
|
161
|
+
"node:crypto",
|
|
162
|
+
"@gala-chain/api"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"path": "./dist/index.esm.js",
|
|
167
|
+
"limit": "250 kB",
|
|
168
|
+
"ignore": [
|
|
169
|
+
"ethers",
|
|
170
|
+
"socket.io-client",
|
|
171
|
+
"bignumber.js",
|
|
172
|
+
"axios",
|
|
173
|
+
"uuid",
|
|
174
|
+
"zod",
|
|
175
|
+
"dotenv",
|
|
176
|
+
"events",
|
|
177
|
+
"@gala-chain/api",
|
|
178
|
+
"fs",
|
|
179
|
+
"path",
|
|
180
|
+
"crypto",
|
|
181
|
+
"node:crypto",
|
|
182
|
+
"os",
|
|
183
|
+
"util",
|
|
184
|
+
"stream",
|
|
185
|
+
"http",
|
|
186
|
+
"https",
|
|
187
|
+
"url",
|
|
188
|
+
"zlib",
|
|
189
|
+
"net",
|
|
190
|
+
"tls"
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"devDependencies": {
|
|
195
|
+
"@testing-library/dom": "^10.4.2",
|
|
196
|
+
"@testing-library/react": "^16.3.3",
|
|
197
|
+
"@types/react": "^19.3.0",
|
|
198
|
+
"@typescript-eslint/eslint-plugin": "^8.70.1",
|
|
199
|
+
"@typescript-eslint/parser": "^8.70.1",
|
|
200
|
+
"@typescript/native": "npm:typescript@^7.0.2",
|
|
201
|
+
"@vitest/coverage-v8": "^5.0.1",
|
|
202
|
+
"eslint": "^10.11.0",
|
|
203
|
+
"eslint-config-prettier": "^10.1.8",
|
|
204
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
205
|
+
"eslint-plugin-unused-imports": "^4.4.1",
|
|
206
|
+
"jscpd": "^5.1.2",
|
|
207
|
+
"react": "^19.3.0",
|
|
208
|
+
"react-dom": "^19.3.0",
|
|
209
|
+
"tsx": "^4.21.0",
|
|
210
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
211
|
+
"vite": "^8.3.0",
|
|
212
|
+
"vitest": "^5.0.1"
|
|
213
|
+
},
|
|
57
214
|
"scripts": {
|
|
58
215
|
"build": "pnpm run build:version && pnpm run clean && pnpm run build:types && pnpm run build:bundle",
|
|
59
216
|
"build:version": "tsx scripts/inject-version.ts",
|
|
@@ -181,15 +338,8 @@
|
|
|
181
338
|
"debug:websocket:prod": "ENVIRONMENT=prod tsx examples/debug/websocket-monitor.ts",
|
|
182
339
|
"debug:websocket:discovery": "ENVIRONMENT=stage tsx examples/debug/websocket-event-discovery.ts",
|
|
183
340
|
"demo:subscribe:tokens": "ENVIRONMENT=stage tsx examples/monitoring/subscribe-token-creations.ts",
|
|
184
|
-
"demo:subscribe:pools": "ENVIRONMENT=stage tsx examples/monitoring/subscribe-pool-creations.ts",
|
|
185
341
|
"demo:subscribe:pools:integration": "ENVIRONMENT=stage tsx examples/monitoring/pool-creation-integration.ts",
|
|
186
|
-
"demo:swap-monitor:volume": "tsx examples/swap-monitoring/volume-monitor.ts",
|
|
187
|
-
"demo:swap-monitor:health": "tsx examples/swap-monitoring/health-monitor.ts",
|
|
188
|
-
"demo:watch:liquidity": "tsx examples/monitoring/liquidity-monitor.ts",
|
|
189
|
-
"demo:watch:liquidity:pool": "tsx examples/monitoring/pool-liquidity-tracker.ts",
|
|
190
342
|
"demo:watch:liquidity:e2e": "tsx examples/monitoring/liquidity-e2e-test.ts",
|
|
191
|
-
"demo:monitoring:liquidity-added": "tsx examples/monitoring/subscribe-liquidity-added.ts",
|
|
192
|
-
"demo:monitoring:liquidity-removed": "tsx examples/monitoring/subscribe-liquidity-removed.ts",
|
|
193
343
|
"demo:watch:fees:e2e": "tsx examples/monitoring/fees-collection-e2e.ts",
|
|
194
344
|
"demo:watch:fees:guaranteed": "tsx examples/monitoring/fees-collection-guaranteed.ts",
|
|
195
345
|
"demo:bridge:tokens": "tsx examples/bridge/supported-tokens.ts",
|
|
@@ -320,162 +470,5 @@
|
|
|
320
470
|
"docs:serve": "http-server docs/api -p 8080",
|
|
321
471
|
"size": "size-limit",
|
|
322
472
|
"analyze": "rollup -c rollup.config.mjs --bundleAnalyzerReport"
|
|
323
|
-
},
|
|
324
|
-
"keywords": [
|
|
325
|
-
"gala",
|
|
326
|
-
"galachain",
|
|
327
|
-
"launchpad",
|
|
328
|
-
"defi",
|
|
329
|
-
"blockchain",
|
|
330
|
-
"ethereum",
|
|
331
|
-
"token",
|
|
332
|
-
"trading",
|
|
333
|
-
"sdk",
|
|
334
|
-
"typescript",
|
|
335
|
-
"api-client",
|
|
336
|
-
"crypto",
|
|
337
|
-
"web3",
|
|
338
|
-
"wallet",
|
|
339
|
-
"optional-wallet",
|
|
340
|
-
"read-only-mode",
|
|
341
|
-
"signature-auth",
|
|
342
|
-
"bonding-curve",
|
|
343
|
-
"token-creation",
|
|
344
|
-
"price-history",
|
|
345
|
-
"portfolio",
|
|
346
|
-
"comments",
|
|
347
|
-
"mcp",
|
|
348
|
-
"ai-agent",
|
|
349
|
-
"automation",
|
|
350
|
-
"agent-sdk",
|
|
351
|
-
"model-context-protocol",
|
|
352
|
-
"dex-trading",
|
|
353
|
-
"token-graduation"
|
|
354
|
-
],
|
|
355
|
-
"author": {
|
|
356
|
-
"name": "Gala Launchpad Team",
|
|
357
|
-
"email": "dev@gala-launchpad.com",
|
|
358
|
-
"url": "https://gala-launchpad.com"
|
|
359
|
-
},
|
|
360
|
-
"license": "MIT",
|
|
361
|
-
"repository": {
|
|
362
|
-
"type": "git",
|
|
363
|
-
"url": "https://gitlab.com/gala-games/defi/launchpad/sdk.git"
|
|
364
|
-
},
|
|
365
|
-
"bugs": {
|
|
366
|
-
"url": "https://gitlab.com/gala-games/defi/launchpad/sdk/-/issues"
|
|
367
|
-
},
|
|
368
|
-
"homepage": "https://gitlab.com/gala-games/defi/launchpad/sdk#readme",
|
|
369
|
-
"engines": {
|
|
370
|
-
"node": ">=20.0.0",
|
|
371
|
-
"npm": ">=10.0.0"
|
|
372
|
-
},
|
|
373
|
-
"publishConfig": {
|
|
374
|
-
"access": "public",
|
|
375
|
-
"registry": "https://registry.npmjs.org/"
|
|
376
|
-
},
|
|
377
|
-
"peerDependencies": {
|
|
378
|
-
"@gala-chain/api": "^3.3.0",
|
|
379
|
-
"axios": "^1.20.0",
|
|
380
|
-
"bignumber.js": "^11.1.5",
|
|
381
|
-
"ethers": "^6.16.0",
|
|
382
|
-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
383
|
-
"socket.io-client": "^4.8.3",
|
|
384
|
-
"zod": "^3.25.76"
|
|
385
|
-
},
|
|
386
|
-
"peerDependenciesMeta": {
|
|
387
|
-
"react": {
|
|
388
|
-
"optional": true
|
|
389
|
-
}
|
|
390
|
-
},
|
|
391
|
-
"browserslist": [
|
|
392
|
-
"> 1%",
|
|
393
|
-
"last 2 versions",
|
|
394
|
-
"not dead",
|
|
395
|
-
"not ie 11"
|
|
396
|
-
],
|
|
397
|
-
"dependencies": {
|
|
398
|
-
"@gala-chain/api": "^3.3.0",
|
|
399
|
-
"@gala-chain/gswap-sdk": "^1.0.0-rc.4",
|
|
400
|
-
"@modelcontextprotocol/sdk": "^1.30.1",
|
|
401
|
-
"@solana/spl-token": "^0.4.15",
|
|
402
|
-
"@solana/web3.js": "^1.99.0",
|
|
403
|
-
"axios": "^1.20.0",
|
|
404
|
-
"bignumber.js": "^11.1.5",
|
|
405
|
-
"bs58": "^6.0.0",
|
|
406
|
-
"dotenv": "^18.0.3",
|
|
407
|
-
"ethers": "^6.16.0",
|
|
408
|
-
"json-stringify-deterministic": "^1.0.16",
|
|
409
|
-
"socket.io-client": "^4.8.3",
|
|
410
|
-
"uuid": "^14.0.2",
|
|
411
|
-
"web-file-polyfill": "^1.0.4",
|
|
412
|
-
"zod": "^4.3.6"
|
|
413
|
-
},
|
|
414
|
-
"size-limit": [
|
|
415
|
-
{
|
|
416
|
-
"path": "./dist/index.browser.esm.js",
|
|
417
|
-
"limit": "500 kB",
|
|
418
|
-
"ignore": [
|
|
419
|
-
"ethers",
|
|
420
|
-
"socket.io-client",
|
|
421
|
-
"bignumber.js",
|
|
422
|
-
"axios",
|
|
423
|
-
"uuid",
|
|
424
|
-
"zod",
|
|
425
|
-
"dotenv",
|
|
426
|
-
"events",
|
|
427
|
-
"crypto",
|
|
428
|
-
"node:crypto",
|
|
429
|
-
"@gala-chain/api"
|
|
430
|
-
]
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
"path": "./dist/index.esm.js",
|
|
434
|
-
"limit": "250 kB",
|
|
435
|
-
"ignore": [
|
|
436
|
-
"ethers",
|
|
437
|
-
"socket.io-client",
|
|
438
|
-
"bignumber.js",
|
|
439
|
-
"axios",
|
|
440
|
-
"uuid",
|
|
441
|
-
"zod",
|
|
442
|
-
"dotenv",
|
|
443
|
-
"events",
|
|
444
|
-
"@gala-chain/api",
|
|
445
|
-
"fs",
|
|
446
|
-
"path",
|
|
447
|
-
"crypto",
|
|
448
|
-
"node:crypto",
|
|
449
|
-
"os",
|
|
450
|
-
"util",
|
|
451
|
-
"stream",
|
|
452
|
-
"http",
|
|
453
|
-
"https",
|
|
454
|
-
"url",
|
|
455
|
-
"zlib",
|
|
456
|
-
"net",
|
|
457
|
-
"tls"
|
|
458
|
-
]
|
|
459
|
-
}
|
|
460
|
-
],
|
|
461
|
-
"devDependencies": {
|
|
462
|
-
"@testing-library/dom": "^10.4.2",
|
|
463
|
-
"@testing-library/react": "^16.3.3",
|
|
464
|
-
"@types/react": "^19.3.0",
|
|
465
|
-
"@typescript-eslint/eslint-plugin": "^8.70.1",
|
|
466
|
-
"@typescript-eslint/parser": "^8.70.1",
|
|
467
|
-
"@typescript/native": "npm:typescript@^7.0.2",
|
|
468
|
-
"@vitest/coverage-v8": "^5.0.1",
|
|
469
|
-
"eslint": "^10.11.0",
|
|
470
|
-
"eslint-config-prettier": "^10.1.8",
|
|
471
|
-
"eslint-plugin-prettier": "^5.5.6",
|
|
472
|
-
"eslint-plugin-unused-imports": "^4.4.1",
|
|
473
|
-
"jscpd": "^5.1.2",
|
|
474
|
-
"react": "^19.3.0",
|
|
475
|
-
"react-dom": "^19.3.0",
|
|
476
|
-
"tsx": "^4.21.0",
|
|
477
|
-
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
478
|
-
"vite": "^8.3.0",
|
|
479
|
-
"vitest": "^5.0.1"
|
|
480
473
|
}
|
|
481
|
-
}
|
|
474
|
+
}
|
|
@@ -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;CAC9B;AAED,qBAAa,eAAgB,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