@gala-chain/launchpad-sdk 3.6.4 → 3.6.5

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.
@@ -7,7 +7,7 @@
7
7
  * @category Utilities
8
8
  * @since 3.6.1
9
9
  */
10
- import { ValidationError } from './validation';
10
+ import { ValidationError } from './errors';
11
11
  /**
12
12
  * Creates a standardized "token not found" validation error
13
13
  *
@@ -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,cAAc,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,UAAU,GACnB,eAAe,CAOjB"}
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;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,UAAU,GACnB,eAAe,CAOjB"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Common Error Classes
3
+ *
4
+ * Base error classes used throughout the SDK for validation and operation failures.
5
+ * Extracted to a separate module to prevent circular dependencies.
6
+ *
7
+ * @category Utilities
8
+ * @since 3.6.5
9
+ */
10
+ /**
11
+ * Error thrown when validation fails
12
+ *
13
+ * This error is used throughout the SDK to indicate that input validation
14
+ * has failed. It provides structured information about what failed and why.
15
+ *
16
+ * @example Basic validation error
17
+ * ```typescript
18
+ * throw new ValidationError(
19
+ * 'Token name must be between 3 and 20 characters',
20
+ * 'tokenName',
21
+ * 'INVALID_TOKEN_NAME'
22
+ * );
23
+ * ```
24
+ *
25
+ * @example Catching validation errors
26
+ * ```typescript
27
+ * try {
28
+ * validateTokenName(name);
29
+ * } catch (error) {
30
+ * if (error instanceof ValidationError) {
31
+ * console.log(`Field: ${error.field}`);
32
+ * console.log(`Code: ${error.code}`);
33
+ * console.log(`Message: ${error.message}`);
34
+ * }
35
+ * }
36
+ * ```
37
+ */
38
+ export declare class ValidationError extends Error {
39
+ field?: string | undefined;
40
+ code?: string | undefined;
41
+ /**
42
+ * Creates a new ValidationError
43
+ *
44
+ * @param message - Human-readable error message describing what failed
45
+ * @param field - Optional field name that failed validation
46
+ * @param code - Optional error code for programmatic handling (e.g., 'INVALID_TOKEN_NAME')
47
+ */
48
+ constructor(message: string, field?: string | undefined, code?: string | undefined);
49
+ }
50
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +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"}
@@ -9,14 +9,6 @@
9
9
  */
10
10
  import { FetchPoolOptions, GetAmountOptions, GetGraphOptions, CheckPoolOptions, TokenUrls } from '../types/launchpad.dto.js';
11
11
  import { AddressFormat } from '../types/common.js';
12
- /**
13
- * Error thrown when validation fails
14
- */
15
- export declare class ValidationError extends Error {
16
- field?: string | undefined;
17
- code?: string | undefined;
18
- constructor(message: string, field?: string | undefined, code?: string | undefined);
19
- }
20
12
  /**
21
13
  * Validates a token name according to constraints
22
14
  *
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAiBH,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,SAAS,EACV,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IAG/B,KAAK,CAAC,EAAE,MAAM;IACd,IAAI,CAAC,EAAE,MAAM;gBAFpB,OAAO,EAAE,MAAM,EACR,KAAK,CAAC,EAAE,MAAM,YAAA,EACd,IAAI,CAAC,EAAE,MAAM,YAAA;CAKvB;AAaD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAKzD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAKlE;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,MAAkB,GAC5B,IAAI,CAKN;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAKxD;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAKxE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAKxE;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAKtE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,GAAG,GAAG,I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M,CAAA;CAAE,GAAG,IAAI,CAkBxD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gala-chain/launchpad-sdk",
3
- "version": "3.6.4",
3
+ "version": "3.6.5",
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",