@n1xyz/nord-ts 0.2.0 → 0.3.2

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/const.js DELETED
@@ -1,27 +0,0 @@
1
- const WEBSERVER_PORT = "80";
2
- export const DEBUG_KEYS = [
3
- "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80",
4
- "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d",
5
- "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a",
6
- "0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6",
7
- "0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a",
8
- "0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba",
9
- "0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e",
10
- "0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356",
11
- "0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97",
12
- "0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6",
13
- ];
14
- export const DEV_URL = "http://localhost";
15
- export const WEBSERVER_DEV_URL = DEV_URL + ":" + WEBSERVER_PORT;
16
- export const DEV_TOKEN_INFOS = [
17
- {
18
- address: "0x9a9f2ccfde556a7e9ff0848998aa4a0cfd8863ae",
19
- precision: 6,
20
- tokenId: 0,
21
- name: "usdc",
22
- },
23
- ];
24
- export const DEFAULT_FUNDING_AMOUNTS = {
25
- SOL: ["0.2", 0],
26
- "0x9a9f2ccfde556a7e9ff0848998aa4a0cfd8863ae": ["10000", 6],
27
- };
package/dist/error.js DELETED
@@ -1,51 +0,0 @@
1
- /**
2
- * Custom error class for Nord-related errors
3
- */
4
- export class NordError extends Error {
5
- /** The original error that caused this error */
6
- cause;
7
- /** HTTP status code (if applicable) */
8
- statusCode;
9
- /** Additional error details */
10
- details;
11
- /**
12
- * Create a new NordError
13
- *
14
- * @param message - Error message
15
- * @param options - Error options
16
- */
17
- constructor(message, options = {}) {
18
- super(message);
19
- this.name = "NordError";
20
- this.cause = options.cause;
21
- this.statusCode = options.statusCode;
22
- this.details = options.details;
23
- // Capture stack trace
24
- if (Error.captureStackTrace) {
25
- Error.captureStackTrace(this, NordError);
26
- }
27
- // Handle nested errors
28
- if (this.cause instanceof Error) {
29
- this.stack =
30
- this.stack + "\nCaused by: " + (this.cause.stack || this.cause.message);
31
- }
32
- }
33
- /**
34
- * Convert the error to a string representation
35
- *
36
- * @returns String representation of the error
37
- */
38
- toString() {
39
- let result = `${this.name}: ${this.message}`;
40
- if (this.statusCode) {
41
- result += ` \nstatus: ${this.statusCode}`;
42
- }
43
- if (this.details && Object.keys(this.details).length > 0) {
44
- result += ` \ndetails: ${JSON.stringify(this.details, null, 2)}`;
45
- }
46
- if (this.cause) {
47
- result += ` \ncause: ${this.cause.toString()}`;
48
- }
49
- return result;
50
- }
51
- }