@gala-chain/launchpad-sdk 3.7.1 → 3.7.3
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/dist/LaunchpadSDK.d.ts +3 -21
- package/dist/LaunchpadSDK.d.ts.map +1 -1
- package/dist/api/LaunchpadAPI.d.ts +3 -1
- package/dist/api/LaunchpadAPI.d.ts.map +1 -1
- package/dist/constants/error-messages.d.ts +61 -0
- package/dist/constants/error-messages.d.ts.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/services/BundleService.d.ts.map +1 -1
- package/dist/services/DexService.d.ts.map +1 -1
- package/dist/services/GalaChainService.d.ts.map +1 -1
- package/dist/services/ImageService.d.ts.map +1 -1
- package/dist/services/PoolService.d.ts.map +1 -1
- package/dist/services/SignatureService.d.ts +1 -0
- package/dist/services/SignatureService.d.ts.map +1 -1
- package/dist/services/TokenClassKeyService.d.ts +1 -0
- package/dist/services/TokenClassKeyService.d.ts.map +1 -1
- package/dist/services/TokenResolverService.d.ts.map +1 -1
- package/dist/services/WebSocketManager.d.ts.map +1 -1
- package/dist/types/websocket-data.types.d.ts +43 -0
- package/dist/types/websocket-data.types.d.ts.map +1 -0
- package/dist/types/websocket.types.d.ts +36 -0
- package/dist/types/websocket.types.d.ts.map +1 -1
- package/dist/utils/date-utils.d.ts.map +1 -1
- package/dist/utils/error-factories.d.ts +79 -1
- package/dist/utils/error-factories.d.ts.map +1 -1
- package/dist/utils/errors.d.ts +121 -0
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/http.d.ts +1 -0
- package/dist/utils/http.d.ts.map +1 -1
- package/dist/utils/number-utils.d.ts.map +1 -1
- package/dist/utils/trade-transformers.d.ts +28 -0
- package/dist/utils/trade-transformers.d.ts.map +1 -0
- package/dist/utils/websocket-errors.d.ts +30 -0
- package/dist/utils/websocket-errors.d.ts.map +1 -0
- package/dist/utils/websocket-validators.d.ts +34 -0
- package/dist/utils/websocket-validators.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GalaChainService.d.ts","sourceRoot":"","sources":["../../src/services/GalaChainService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"GalaChainService.d.ts","sourceRoot":"","sources":["../../src/services/GalaChainService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EACL,oBAAoB,EACpB,gCAAgC,EAEjC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EAQlB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,qBAAa,gBAAgB;IAazB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAdhC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;IAClD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAEhC;;;;;;;O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ACH,OAAO,CAAC,yBAAyB;IAqEjC;;;OAGG;YACW,oBAAoB;IA0ClC;;;;OAIG;IACH,OAAO,CAAC,oCAAoC;IA2C5C;;OAEG;IACH,OAAO,CAAC,mBAAmB;CAqD5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageService.d.ts","sourceRoot":"","sources":["../../src/services/ImageService.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ImageService.d.ts","sourceRoot":"","sources":["../../src/services/ImageService.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAMrE;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACG,sBAAsB,CAC1B,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,MAAM,CAAC;CA0DnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PoolService.d.ts","sourceRoot":"","sources":["../../src/services/PoolService.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"PoolService.d.ts","sourceRoot":"","sources":["../../src/services/PoolService.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAS3C,OAAO,EAGL,WAAW,EACX,gBAAgB,EAIhB,eAAe,EAEf,uB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AAC;CAoB1B"}
|
|
@@ -33,6 +33,7 @@ export declare enum WalletPreference {
|
|
|
33
33
|
export declare class SignatureService {
|
|
34
34
|
private walletProvider;
|
|
35
35
|
private debug;
|
|
36
|
+
private readonly logger;
|
|
36
37
|
constructor(walletProvider: any, debug?: boolean);
|
|
37
38
|
/**
|
|
38
39
|
* Sign a DTO using EIP-712 with the appropriate wallet method
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureService.d.ts","sourceRoot":"","sources":["../../src/services/SignatureService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;
|
|
1
|
+
{"version":3,"file":"SignatureService.d.ts","sourceRoot":"","sources":["../../src/services/SignatureService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AA8BH;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,QAAQ,IAAI;IACZ,YAAY,IAAI;IAChB,WAAW,IAAI;CAChB;AAED;;GAEG;AACH,qBAAa,gBAAgB;IAIzB,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,KAAK;IAJf,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;gBAGtB,cAAc,EAAE,GAAG,EACnB,KAAK,GAAE,OAAe;IAKhC;;;;;;;;OAQG;IACG,OAAO,CACX,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,gBAAgB,GAAE,gBAA4C,GAC7D,OAAO,CAAC,GAAG,CAAC;IAiEf;;OAEG;YACW,gBAAgB;IA6C9B;;OAEG;YACW,mBAAmB;IAuBjC;;;OAGG;YACW,kBAAkB;IAiDhC;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAoF3B;;OAEG;IACH,sBAAsB,IAAI,gBAAgB;CAmB3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenClassKeyService.d.ts","sourceRoot":"","sources":["../../src/services/TokenClassKeyService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"TokenClassKeyService.d.ts","sourceRoot":"","sources":["../../src/services/TokenClassKeyService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQhD;;GAEG;AACH,qBAAa,oBAAoB;IAGnB,OAAO,CAAC,KAAK;IAFzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;gBAEZ,KAAK,GAAE,OAAe;IAI1C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,2BAA2B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE;IAuC3D;;;;;;;OAOG;IACH,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa;IAgBvD;;;;OAIG;IACH,kBAAkB,IAAI,aAAa;IAcnC;;;;;;;;;;;;;OAaG;IACH,2BAA2B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM;IAiCzD;;;;;OAKG;IACH,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IA4CnD;;;;;;;;OAQG;IACH,2BAA2B,CACzB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GACpB,MAAM;IAIT;;;;;OAKG;IACH,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG;QAC3C,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,aAAa,EAAE,MAAM,CAAC;KACvB;CAgBF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenResolverService.d.ts","sourceRoot":"","sources":["../../src/services/TokenResolverService.ts"],"names":[],"mappings":"AAAA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;;;;;OAOG;IACH,OAAO,CAAC,gCAAgC;CAoCzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebSocketManager.d.ts","sourceRoot":"","sources":["../../src/services/WebSocketManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"WebSocketManager.d.ts","sourceRoot":"","sources":["../../src/services/WebSocketManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAQvE;;;;;;;;;;;GAWG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAmD;IAE3E;;;;;;;OAOG;IACH,MAAM,CAAC,WAAW,CAChB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,eAAe,EACvB,KAAK,GAAE,OAAe,GACrB,gBAAgB;IA0BnB;;;;;;;;OAQG;IACH,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,OAAe,GAAG,IAAI;IAqBlE;;;;;;;;OAQG;IACH,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,OAAe,GAAG,IAAI;IAY5D;;;;;;;OAOG;IACH,MAAM,CAAC,aAAa,CAAC,KAAK,GAAE,OAAe,GAAG,IAAI;IAYlD;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,IAAI,KAAK,CAAC;QAChC,GAAG,EAAE,MAAM,CAAC;QACZ,cAAc,EAAE,MAAM,CAAC;QACvB,WAAW,EAAE,OAAO,CAAC;KACtB,CAAC;IAQF;;;;;OAKG;IACH,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI1C;;;;;OAKG;IACH,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAK7C;;;;;;;;OAQG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;CAGzB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebSocket Data Types
|
|
3
|
+
*
|
|
4
|
+
* TypeScript interfaces for WebSocket response data structures.
|
|
5
|
+
*
|
|
6
|
+
* @category Types
|
|
7
|
+
* @since 3.7.2
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Trade data from WebSocket responses
|
|
11
|
+
*/
|
|
12
|
+
export interface WsTradeData {
|
|
13
|
+
inputQuantity?: string;
|
|
14
|
+
outputQuantity?: string;
|
|
15
|
+
totalFees?: string;
|
|
16
|
+
vaultAddress?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Token launch data from WebSocket responses
|
|
20
|
+
*/
|
|
21
|
+
export interface WsLaunchData {
|
|
22
|
+
vaultAddress?: string;
|
|
23
|
+
tokenStringKey?: string;
|
|
24
|
+
creatorAddress?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Token transfer data from WebSocket responses
|
|
28
|
+
*/
|
|
29
|
+
export interface WsTransferData {
|
|
30
|
+
fromAddress?: string;
|
|
31
|
+
toAddress?: string;
|
|
32
|
+
amount?: string;
|
|
33
|
+
tokenSymbol?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Comment data from WebSocket responses
|
|
37
|
+
*/
|
|
38
|
+
export interface WsCommentData {
|
|
39
|
+
commentId?: string;
|
|
40
|
+
content?: string;
|
|
41
|
+
author?: string;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=websocket-data.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"websocket-data.types.d.ts","sourceRoot":"","sources":["../../src/types/websocket-data.types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -79,4 +79,40 @@ export declare enum SDKTransactionStatus {
|
|
|
79
79
|
* ```
|
|
80
80
|
*/
|
|
81
81
|
export declare const SOCKET_STATUS_MAP: Record<BackendSocketStatus, SDKTransactionStatus>;
|
|
82
|
+
/**
|
|
83
|
+
* WebSocket transaction response structure
|
|
84
|
+
*
|
|
85
|
+
* This interface defines the shape of WebSocket responses received from
|
|
86
|
+
* transaction monitoring. It contains the normalized status, timing information,
|
|
87
|
+
* and blockchain metadata.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```typescript
|
|
91
|
+
* const wsResponse: WebSocketResponse = {
|
|
92
|
+
* transactionId: 'abc123',
|
|
93
|
+
* status: SDKTransactionStatus.COMPLETED,
|
|
94
|
+
* timestamp: Date.now(),
|
|
95
|
+
* blockHash: '0x...',
|
|
96
|
+
* gasUsed: '21000'
|
|
97
|
+
* };
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* @since 3.7.2
|
|
101
|
+
*/
|
|
102
|
+
export interface WebSocketResponse {
|
|
103
|
+
/** Unique transaction identifier */
|
|
104
|
+
transactionId: string;
|
|
105
|
+
/** Normalized transaction status */
|
|
106
|
+
status: SDKTransactionStatus;
|
|
107
|
+
/** Optional status message or error description */
|
|
108
|
+
message?: string;
|
|
109
|
+
/** Timestamp when the status update was received */
|
|
110
|
+
timestamp: number;
|
|
111
|
+
/** Blockchain block hash (if transaction was mined) */
|
|
112
|
+
blockHash?: string;
|
|
113
|
+
/** Gas used by the transaction */
|
|
114
|
+
gasUsed?: string;
|
|
115
|
+
/** Additional data payload (trade, launch, transfer, etc.) */
|
|
116
|
+
data?: unknown;
|
|
117
|
+
}
|
|
82
118
|
//# sourceMappingURL=websocket.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websocket.types.d.ts","sourceRoot":"","sources":["../../src/types/websocket.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;GAaG;AACH,oBAAY,mBAAmB;IAC7B,kDAAkD;IAClD,SAAS,cAAc;IACvB,oEAAoE;IACpE,SAAS,cAAc;IACvB,4DAA4D;IAC5D,OAAO,YAAY;IACnB,yBAAyB;IACzB,MAAM,WAAW;IACjB,+DAA+D;IAC/D,KAAK,UAAU;IACf,+CAA+C;IAC/C,UAAU,eAAe;IACzB,wCAAwC;IACxC,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,oBAAY,oBAAoB;IAC9B,wCAAwC;IACxC,OAAO,YAAY;IACnB,+CAA+C;IAC/C,UAAU,eAAe;IACzB,yCAAyC;IACzC,SAAS,cAAc;IACvB,yBAAyB;IACzB,MAAM,WAAW;IACjB,uCAAuC;IACvC,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,EAAE,oBAAoB,CAQ/E,CAAC"}
|
|
1
|
+
{"version":3,"file":"websocket.types.d.ts","sourceRoot":"","sources":["../../src/types/websocket.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;GAaG;AACH,oBAAY,mBAAmB;IAC7B,kDAAkD;IAClD,SAAS,cAAc;IACvB,oEAAoE;IACpE,SAAS,cAAc;IACvB,4DAA4D;IAC5D,OAAO,YAAY;IACnB,yBAAyB;IACzB,MAAM,WAAW;IACjB,+DAA+D;IAC/D,KAAK,UAAU;IACf,+CAA+C;IAC/C,UAAU,eAAe;IACzB,wCAAwC;IACxC,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,oBAAY,oBAAoB;IAC9B,wCAAwC;IACxC,OAAO,YAAY;IACnB,+CAA+C;IAC/C,UAAU,eAAe;IACzB,yCAAyC;IACzC,SAAS,cAAc;IACvB,yBAAyB;IACzB,MAAM,WAAW;IACjB,uCAAuC;IACvC,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,EAAE,oBAAoB,CAQ/E,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,iBAAiB;IAChC,oCAAoC;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-utils.d.ts","sourceRoot":"","sources":["../../src/utils/date-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"date-utils.d.ts","sourceRoot":"","sources":["../../src/utils/date-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,EAC5C,QAAQ,CAAC,EAAE,IAAI,GACd,IAAI,CA2BN;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,WAAW,EAAE,CAAC,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,EACjD,QAAQ,CAAC,EAAE,IAAI,GACd,IAAI,EAAE,CAER;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,GAC3C,OAAO,CAiBT;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,EAC5C,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,IAAI,GACd,IAAI,CAiCN"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @category Utilities
|
|
8
8
|
* @since 3.6.1
|
|
9
9
|
*/
|
|
10
|
-
import { ValidationError } from './errors';
|
|
10
|
+
import { ValidationError, NetworkError, ConfigurationError, TransactionError } from './errors';
|
|
11
11
|
/**
|
|
12
12
|
* Creates a standardized "token not found" validation error
|
|
13
13
|
*
|
|
@@ -219,4 +219,82 @@ export declare function createRequiredFieldError(fieldName: string, displayName?
|
|
|
219
219
|
* @since 3.6.6
|
|
220
220
|
*/
|
|
221
221
|
export declare function createInvalidFormatError(fieldName: string, expectedFormat: string, displayName?: string): ValidationError;
|
|
222
|
+
/**
|
|
223
|
+
* Creates a standardized network error
|
|
224
|
+
*
|
|
225
|
+
* This factory eliminates duplicate network error messages found across
|
|
226
|
+
* HTTP clients and service layers. It provides consistent messaging for
|
|
227
|
+
* API communication failures.
|
|
228
|
+
*
|
|
229
|
+
* @param message Human-readable error message
|
|
230
|
+
* @param statusCode Optional HTTP status code
|
|
231
|
+
* @param originalError Optional original error that caused this failure
|
|
232
|
+
* @returns NetworkError with structured data
|
|
233
|
+
*
|
|
234
|
+
* @example HTTP request failure
|
|
235
|
+
* ```typescript
|
|
236
|
+
* try {
|
|
237
|
+
* const response = await fetch('/api/pools');
|
|
238
|
+
* } catch (error) {
|
|
239
|
+
* throw createNetworkError(
|
|
240
|
+
* 'Failed to fetch pool data',
|
|
241
|
+
* response.status,
|
|
242
|
+
* error
|
|
243
|
+
* );
|
|
244
|
+
* }
|
|
245
|
+
* ```
|
|
246
|
+
*
|
|
247
|
+
* @since 3.7.3
|
|
248
|
+
*/
|
|
249
|
+
export declare function createNetworkError(message: string, statusCode?: number, originalError?: Error): NetworkError;
|
|
250
|
+
/**
|
|
251
|
+
* Creates a standardized configuration error
|
|
252
|
+
*
|
|
253
|
+
* This factory eliminates duplicate configuration error messages found
|
|
254
|
+
* during SDK initialization. It provides consistent messaging for
|
|
255
|
+
* invalid or missing configuration parameters.
|
|
256
|
+
*
|
|
257
|
+
* @param message Human-readable error message
|
|
258
|
+
* @param field Optional configuration field name
|
|
259
|
+
* @returns ConfigurationError with structured data
|
|
260
|
+
*
|
|
261
|
+
* @example Invalid timeout
|
|
262
|
+
* ```typescript
|
|
263
|
+
* if (config.timeout < 1000 || config.timeout > 300000) {
|
|
264
|
+
* throw createConfigurationError(
|
|
265
|
+
* 'Invalid timeout value: must be between 1000 and 300000',
|
|
266
|
+
* 'timeout'
|
|
267
|
+
* );
|
|
268
|
+
* }
|
|
269
|
+
* ```
|
|
270
|
+
*
|
|
271
|
+
* @since 3.7.3
|
|
272
|
+
*/
|
|
273
|
+
export declare function createConfigurationError(message: string, field?: string): ConfigurationError;
|
|
274
|
+
/**
|
|
275
|
+
* Creates a standardized transaction error
|
|
276
|
+
*
|
|
277
|
+
* This factory eliminates duplicate transaction error messages found
|
|
278
|
+
* across blockchain interaction layers. It provides consistent messaging
|
|
279
|
+
* for transaction failures with tracking information.
|
|
280
|
+
*
|
|
281
|
+
* @param message Human-readable error message
|
|
282
|
+
* @param transactionId Optional transaction identifier
|
|
283
|
+
* @param code Optional error code for programmatic handling
|
|
284
|
+
* @returns TransactionError with structured data
|
|
285
|
+
*
|
|
286
|
+
* @example Transaction reverted
|
|
287
|
+
* ```typescript
|
|
288
|
+
* if (receipt.status === 'reverted') {
|
|
289
|
+
* throw createTransactionError(
|
|
290
|
+
* 'Transaction reverted: insufficient balance',
|
|
291
|
+
* transactionId,
|
|
292
|
+
* 'INSUFFICIENT_BALANCE'
|
|
293
|
+
* );
|
|
294
|
+
* }
|
|
295
|
+
* ```
|
|
296
|
+
*
|
|
297
|
+
* @since 3.7.3
|
|
298
|
+
*/
|
|
299
|
+
export declare function createTransactionError(message: string, transactionId?: string, code?: string): TransactionError;
|
|
222
300
|
//# sourceMappingURL=error-factories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-factories.d.ts","sourceRoot":"","sources":["../../src/utils/error-factories.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"error-factories.d.ts","sourceRoot":"","sources":["../../src/utils/error-factories.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE/F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,UAAU,GACnB,eAAe,CAOjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,GACnB,eAAe,CAOjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,MAAM,GACnB,eAAe,CAOjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,KAAK,GACpB,YAAY,CAEd;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,GACb,kBAAkB,CAEpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,EAAE,MAAM,EACtB,IAAI,CAAC,EAAE,MAAM,GACZ,gBAAgB,CAElB"}
|
package/dist/utils/errors.d.ts
CHANGED
|
@@ -47,4 +47,125 @@ export declare class ValidationError extends Error {
|
|
|
47
47
|
*/
|
|
48
48
|
constructor(message: string, field?: string | undefined, code?: string | undefined);
|
|
49
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Error thrown when network operations fail
|
|
52
|
+
*
|
|
53
|
+
* This error is used for HTTP request failures, API communication errors,
|
|
54
|
+
* and network connectivity issues. It captures the HTTP status code and
|
|
55
|
+
* original error for debugging.
|
|
56
|
+
*
|
|
57
|
+
* @example HTTP request failure
|
|
58
|
+
* ```typescript
|
|
59
|
+
* throw new NetworkError(
|
|
60
|
+
* 'Failed to fetch pool data',
|
|
61
|
+
* 404,
|
|
62
|
+
* originalError
|
|
63
|
+
* );
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @example Catching network errors
|
|
67
|
+
* ```typescript
|
|
68
|
+
* try {
|
|
69
|
+
* await api.fetchPools();
|
|
70
|
+
* } catch (error) {
|
|
71
|
+
* if (error instanceof NetworkError) {
|
|
72
|
+
* if (error.statusCode === 404) {
|
|
73
|
+
* console.log('Resource not found');
|
|
74
|
+
* } else if (error.statusCode && error.statusCode >= 500) {
|
|
75
|
+
* console.log('Server error, retry later');
|
|
76
|
+
* }
|
|
77
|
+
* }
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export declare class NetworkError extends Error {
|
|
82
|
+
statusCode?: number | undefined;
|
|
83
|
+
originalError?: Error | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Creates a new NetworkError
|
|
86
|
+
*
|
|
87
|
+
* @param message - Human-readable error message describing what failed
|
|
88
|
+
* @param statusCode - Optional HTTP status code (404, 500, etc.)
|
|
89
|
+
* @param originalError - Optional original error that caused this failure
|
|
90
|
+
*/
|
|
91
|
+
constructor(message: string, statusCode?: number | undefined, originalError?: Error | undefined);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Error thrown when SDK configuration is invalid
|
|
95
|
+
*
|
|
96
|
+
* This error is used during SDK initialization when configuration parameters
|
|
97
|
+
* are missing, malformed, or incompatible. It helps users identify and fix
|
|
98
|
+
* configuration issues quickly.
|
|
99
|
+
*
|
|
100
|
+
* @example Invalid configuration
|
|
101
|
+
* ```typescript
|
|
102
|
+
* throw new ConfigurationError(
|
|
103
|
+
* 'Invalid timeout value: must be between 1000 and 300000',
|
|
104
|
+
* 'timeout'
|
|
105
|
+
* );
|
|
106
|
+
* ```
|
|
107
|
+
*
|
|
108
|
+
* @example Catching configuration errors
|
|
109
|
+
* ```typescript
|
|
110
|
+
* try {
|
|
111
|
+
* const sdk = new LaunchpadSDK(config);
|
|
112
|
+
* } catch (error) {
|
|
113
|
+
* if (error instanceof ConfigurationError) {
|
|
114
|
+
* console.log(`Fix config field: ${error.field}`);
|
|
115
|
+
* console.log(`Issue: ${error.message}`);
|
|
116
|
+
* }
|
|
117
|
+
* }
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
export declare class ConfigurationError extends Error {
|
|
121
|
+
field?: string | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Creates a new ConfigurationError
|
|
124
|
+
*
|
|
125
|
+
* @param message - Human-readable error message describing the configuration issue
|
|
126
|
+
* @param field - Optional configuration field name that is invalid
|
|
127
|
+
*/
|
|
128
|
+
constructor(message: string, field?: string | undefined);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Error thrown when blockchain transactions fail
|
|
132
|
+
*
|
|
133
|
+
* This error is used for transaction-related failures including submission errors,
|
|
134
|
+
* execution failures, and invalid transaction states. It captures the transaction ID
|
|
135
|
+
* and error code for debugging and recovery.
|
|
136
|
+
*
|
|
137
|
+
* @example Transaction execution failure
|
|
138
|
+
* ```typescript
|
|
139
|
+
* throw new TransactionError(
|
|
140
|
+
* 'Transaction reverted: insufficient balance',
|
|
141
|
+
* 'abc123',
|
|
142
|
+
* 'INSUFFICIENT_BALANCE'
|
|
143
|
+
* );
|
|
144
|
+
* ```
|
|
145
|
+
*
|
|
146
|
+
* @example Catching transaction errors
|
|
147
|
+
* ```typescript
|
|
148
|
+
* try {
|
|
149
|
+
* const result = await sdk.buy(options);
|
|
150
|
+
* } catch (error) {
|
|
151
|
+
* if (error instanceof TransactionError) {
|
|
152
|
+
* console.log(`Transaction ${error.transactionId} failed`);
|
|
153
|
+
* console.log(`Error code: ${error.code}`);
|
|
154
|
+
* // Implement retry logic or user notification
|
|
155
|
+
* }
|
|
156
|
+
* }
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
export declare class TransactionError extends Error {
|
|
160
|
+
transactionId?: string | undefined;
|
|
161
|
+
code?: string | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* Creates a new TransactionError
|
|
164
|
+
*
|
|
165
|
+
* @param message - Human-readable error message describing what failed
|
|
166
|
+
* @param transactionId - Optional transaction identifier for tracking
|
|
167
|
+
* @param code - Optional error code for programmatic handling
|
|
168
|
+
*/
|
|
169
|
+
constructor(message: string, transactionId?: string | undefined, code?: string | undefined);
|
|
170
|
+
}
|
|
50
171
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IAU/B,KAAK,CAAC,EAAE,MAAM;IACd,IAAI,CAAC,EAAE,MAAM;IAVtB;;;;;;OAMG;gBAED,OAAO,EAAE,MAAM,EACR,KAAK,CAAC,EAAE,MAAM,YAAA,EACd,IAAI,CAAC,EAAE,MAAM,YAAA;CAKvB"}
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IAU/B,KAAK,CAAC,EAAE,MAAM;IACd,IAAI,CAAC,EAAE,MAAM;IAVtB;;;;;;OAMG;gBAED,OAAO,EAAE,MAAM,EACR,KAAK,CAAC,EAAE,MAAM,YAAA,EACd,IAAI,CAAC,EAAE,MAAM,YAAA;CAKvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAAa,YAAa,SAAQ,KAAK;IAU5B,UAAU,CAAC,EAAE,MAAM;IACnB,aAAa,CAAC,EAAE,KAAK;IAV9B;;;;;;OAMG;gBAED,OAAO,EAAE,MAAM,EACR,UAAU,CAAC,EAAE,MAAM,YAAA,EACnB,aAAa,CAAC,EAAE,KAAK,YAAA;CAK/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;IASlC,KAAK,CAAC,EAAE,MAAM;IARvB;;;;;OAKG;gBAED,OAAO,EAAE,MAAM,EACR,KAAK,CAAC,EAAE,MAAM,YAAA;CAKxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IAUhC,aAAa,CAAC,EAAE,MAAM;IACtB,IAAI,CAAC,EAAE,MAAM;IAVtB;;;;;;OAMG;gBAED,OAAO,EAAE,MAAM,EACR,aAAa,CAAC,EAAE,MAAM,YAAA,EACtB,IAAI,CAAC,EAAE,MAAM,YAAA;CAKvB"}
|
package/dist/utils/http.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare class HttpClient {
|
|
|
11
11
|
private readonly axios;
|
|
12
12
|
private readonly auth;
|
|
13
13
|
private readonly debug;
|
|
14
|
+
private readonly logger;
|
|
14
15
|
private requestInterceptorId;
|
|
15
16
|
private responseInterceptorId;
|
|
16
17
|
constructor(auth: SignatureAuth, config?: SDKConfig);
|
package/dist/utils/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAiB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE1E,OAAO,EAAiB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEjE;;;;;GAKG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,IAA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AAC,EAAE,GAAG,EACV,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,CAAC,CAAC;IASb;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;OAEG;IACH,kBAAkB,IAAI,MAAM;IAI5B;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKnD;;OAEG;IACG,aAAa,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IAI3E;;;;;;OAMG;IACG,iBAAiB,CACrB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE,CAAC;IAyB3E;;;OAGG;IACG,iBAAiB,CAAC,CAAC,SAAS,MAAM,EACtC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,CAAC,EACN,WAAW,GAAE,WAAyC,GACrD,OAAO,CACR,CAAC,GAAG;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,GAAG,CAAC;QAAC,MAAM,EAAE,GAAG,CAAA;KAAE,CACpE;IAkBD;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAwEzB;;;OAGG;IACH,OAAO,IAAI,IAAI;CAahB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-utils.d.ts","sourceRoot":"","sources":["../../src/utils/number-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"number-utils.d.ts","sourceRoot":"","sources":["../../src/utils/number-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EACzC,QAAQ,EAAE,MAAM,GACf,MAAM,CAuBR;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EACzC,QAAQ,EAAE,MAAM,GACf,MAAM,CAmBR;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GACxC,OAAO,CAWT;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EACzC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,MAAM,CA0BR;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAiC,GAAG,MAAM,CAO7F;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9D"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trade Result Transformers
|
|
3
|
+
*
|
|
4
|
+
* Shared utilities for transforming WebSocket trade responses into TradeResult objects.
|
|
5
|
+
* Eliminates duplicate transformation logic between buy() and sell() operations.
|
|
6
|
+
*
|
|
7
|
+
* @category Utilities
|
|
8
|
+
* @since 3.7.2
|
|
9
|
+
*/
|
|
10
|
+
import { TradeResult } from '../types/result.types';
|
|
11
|
+
import { BuyTokenOptions, SellTokenOptions } from '../types/options.dto';
|
|
12
|
+
/**
|
|
13
|
+
* Transform WebSocket trade response into TradeResult
|
|
14
|
+
*
|
|
15
|
+
* This function consolidates the duplicate transformation logic from buy() and sell() methods.
|
|
16
|
+
* The only difference between buy and sell transformations is the 'type' field.
|
|
17
|
+
*
|
|
18
|
+
* @param wsResponse Raw WebSocket response
|
|
19
|
+
* @param transactionId Transaction ID for validation
|
|
20
|
+
* @param tradeType Type of trade ('buy' or 'sell')
|
|
21
|
+
* @param options Original trade options (buy or sell)
|
|
22
|
+
* @returns Transformed TradeResult object
|
|
23
|
+
*
|
|
24
|
+
* @throws {WebSocketError} If response structure is invalid
|
|
25
|
+
* @throws {WebSocketError} If trade data validation fails
|
|
26
|
+
*/
|
|
27
|
+
export declare function transformTradeResult(wsResponse: any, transactionId: string, tradeType: 'buy' | 'sell', options: BuyTokenOptions | SellTokenOptions): TradeResult;
|
|
28
|
+
//# sourceMappingURL=trade-transformers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trade-transformers.d.ts","sourceRoot":"","sources":["../../src/utils/trade-transformers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAIzE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,GAAG,EACf,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,KAAK,GAAG,MAAM,EACzB,OAAO,EAAE,eAAe,GAAG,gBAAgB,GAC1C,WAAW,CA8Bb"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebSocket Error Classes
|
|
3
|
+
*
|
|
4
|
+
* Custom error types for WebSocket transaction monitoring and confirmation.
|
|
5
|
+
*
|
|
6
|
+
* @category Errors
|
|
7
|
+
* @since 3.7.2
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Base error for WebSocket-related failures
|
|
11
|
+
*/
|
|
12
|
+
export declare class WebSocketError extends Error {
|
|
13
|
+
readonly cause?: Error | undefined;
|
|
14
|
+
constructor(message: string, cause?: Error | undefined);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Error thrown when WebSocket confirmation times out
|
|
18
|
+
*/
|
|
19
|
+
export declare class WebSocketTimeoutError extends WebSocketError {
|
|
20
|
+
constructor(transactionId: string, timeoutMs: number);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Error thrown when a transaction fails on-chain
|
|
24
|
+
*/
|
|
25
|
+
export declare class TransactionFailedError extends Error {
|
|
26
|
+
readonly transactionId: string;
|
|
27
|
+
readonly status: string;
|
|
28
|
+
constructor(transactionId: string, status: string, message?: string);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=websocket-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"websocket-errors.d.ts","sourceRoot":"","sources":["../../src/utils/websocket-errors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,qBAAa,cAAe,SAAQ,KAAK;aACM,KAAK,CAAC,EAAE,KAAK;gBAA9C,OAAO,EAAE,MAAM,EAAkB,KAAK,CAAC,EAAE,KAAK,YAAA;CAI3D;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,cAAc;gBAC3C,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAIrD;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;aAE7B,aAAa,EAAE,MAAM;aACrB,MAAM,EAAE,MAAM;gBADd,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EAC9B,OAAO,CAAC,EAAE,MAAM;CAKnB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebSocket Validators
|
|
3
|
+
*
|
|
4
|
+
* Type guards and validation functions for WebSocket response data.
|
|
5
|
+
*
|
|
6
|
+
* @category Validation
|
|
7
|
+
* @since 3.7.2
|
|
8
|
+
*/
|
|
9
|
+
import { WsTradeData, WsLaunchData, WsTransferData, WsCommentData } from '../types/websocket-data.types';
|
|
10
|
+
/**
|
|
11
|
+
* Type guard for trade data from WebSocket responses
|
|
12
|
+
*/
|
|
13
|
+
export declare function isWsTradeData(data: any): data is WsTradeData;
|
|
14
|
+
/**
|
|
15
|
+
* Type guard for token launch data from WebSocket responses
|
|
16
|
+
*/
|
|
17
|
+
export declare function isWsLaunchData(data: any): data is WsLaunchData;
|
|
18
|
+
/**
|
|
19
|
+
* Type guard for token transfer data from WebSocket responses
|
|
20
|
+
*/
|
|
21
|
+
export declare function isWsTransferData(data: any): data is WsTransferData;
|
|
22
|
+
/**
|
|
23
|
+
* Type guard for comment data from WebSocket responses
|
|
24
|
+
*/
|
|
25
|
+
export declare function isWsCommentData(data: any): data is WsCommentData;
|
|
26
|
+
/**
|
|
27
|
+
* Validates WebSocket response structure
|
|
28
|
+
*
|
|
29
|
+
* @param wsResponse The WebSocket response to validate
|
|
30
|
+
* @param transactionId The transaction ID for error messaging
|
|
31
|
+
* @throws {WebSocketError} If the response structure is invalid
|
|
32
|
+
*/
|
|
33
|
+
export declare function validateWebSocketResponse(wsResponse: any, transactionId: string): void;
|
|
34
|
+
//# sourceMappingURL=websocket-validators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"websocket-validators.d.ts","sourceRoot":"","sources":["../../src/utils/websocket-validators.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,WAAW,EACX,YAAY,EACZ,cAAc,EACd,aAAa,EACd,MAAM,+BAA+B,CAAC;AAGvC;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,WAAW,CAY5D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,YAAY,CAW9D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,cAAc,CAYlE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,aAAa,CAWhE;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAatF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gala-chain/launchpad-sdk",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.3",
|
|
4
4
|
"description": "TypeScript SDK for Gala Launchpad Backend API - Production-ready DeFi token launchpad integration with wallet-based authentication, GalaChain trading, and comprehensive user operations. 100% tested (22/22 endpoints working).",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|