@gala-chain/launchpad-sdk 3.7.2 → 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.map +1 -1
- package/dist/api/LaunchpadAPI.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/services/TokenClassKeyService.d.ts.map +1 -1
- package/dist/services/TokenResolverService.d.ts.map +1 -1
- package/dist/types/websocket.types.d.ts +36 -0
- package/dist/types/websocket.types.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/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DexService.d.ts","sourceRoot":"","sources":["../../src/services/DexService.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"DexService.d.ts","sourceRoot":"","sources":["../../src/services/DexService.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAQjE;;;;;;;;;GASG;AACH,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACG,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAsChF;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACG,4BAA4B,CAChC,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,CAAC,OAAO,EAAE,yBAAyB,KAAK,OAAO,CAAC,uBAAuB,CAAC,GAC3F,OAAO,CAAC,cAAc,CAAC;CAoD3B"}
|
|
@@ -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;;;;;;;OAOG;gBAEgB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,oBAAoB,EACpD,KAAK,GAAE,OAAe;IAUxB;;;;;;;;;;;;;;;;;;OAkBG;IACG,gBAAgB,CACpB,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAAC,gCAAgC,CAAC;IAsB5C;;OAEG;IACH,OAAO,CAAC,4BAA4B;IAiCpC;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,gBAAgB,CAAC,WAAW,EAAE;QAClC,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAItC;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,iBAAiB,CAAC,WAAW,EAAE;QACnC,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAwDtC;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;IA6E3D;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC;IAwG7D;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACG,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IA2BrE;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAgDhC;;OAEG;IACH,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,uBAAuB,EAEvB,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EAErB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,WAAW;IACV,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C;;;;;OAKG;IACG,UAAU,CACd,OAAO,GAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;KACX,GACL,OAAO,CAAC,WAAW,CAAC;IAgFvB;;;;;OAKG;IACG,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IAqC5D;;;;;OAKG;IACG,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAW/D;;;;;OAKG;IACG,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAW9D;;;;;OAKG;IACG,eAAe,CACnB,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,eAAe,CAAC;IAiD3B;;;;;;;;OAQG;IACG,sBAAsB,CAC1B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,uBAAuB,CAAC;IAoCnC;;;;;;;;OAQG;IACG,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAwBrE;;;;;OAKG;IACG,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;IAkBpE;;;;;;;;;;;;;;;;OAgBG;IACG,uBAAuB,CAC3B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAoB1B"}
|
|
@@ -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;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"TokenResolverService.d.ts","sourceRoot":"","sources":["../../src/services/TokenResolverService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAMrD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,oBAAoB;IAanB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAZxC;;;;OAIG;IACH,OAAO,CAAC,KAAK,CAA6B;IAE1C;;;;OAIG;gBAC0B,WAAW,EAAE,WAAW;IAErD;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAmCpE;;;;;;;;;;;;;;;;;;OAkBG;IACG,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAerE;;;;;OAKG;IACH,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIrC;;;;;OAKG;IACH,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI;IAIlD;;;;OAIG;IACH,KAAK,IAAI,IAAI;IAIb;;;;OAIG;IACH,QAAQ,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE;IAO5C;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CACL,QAAQ,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC,GAC3D,IAAI;IAMP;;;;;;;OAOG;IACH,OAAO,CAAC,gCAAgC;CAoCzC"}
|
|
@@ -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"}
|
|
@@ -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/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",
|