@n1xyz/nord-ts 0.3.1 → 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.
Files changed (41) hide show
  1. package/dist/gen/openapi.d.ts +119 -0
  2. package/dist/index.browser.js +96410 -0
  3. package/dist/index.common.js +116210 -0
  4. package/package.json +8 -5
  5. package/dist/actions.js +0 -184
  6. package/dist/client/Nord.js +0 -759
  7. package/dist/client/NordAdmin.js +0 -362
  8. package/dist/client/NordUser.js +0 -752
  9. package/dist/const.js +0 -27
  10. package/dist/error.js +0 -51
  11. package/dist/gen/nord_pb.js +0 -1068
  12. package/dist/gen/openapi.js +0 -5
  13. package/dist/index.js +0 -10
  14. package/dist/nord/api/actions.d.ts +0 -128
  15. package/dist/nord/api/actions.js +0 -396
  16. package/dist/nord/api/core.d.ts +0 -16
  17. package/dist/nord/api/core.js +0 -81
  18. package/dist/nord/api/metrics.d.ts +0 -67
  19. package/dist/nord/api/metrics.js +0 -229
  20. package/dist/nord/api/triggers.d.ts +0 -7
  21. package/dist/nord/api/triggers.js +0 -38
  22. package/dist/nord/client/Nord.d.ts +0 -387
  23. package/dist/nord/client/Nord.js +0 -747
  24. package/dist/nord/client/NordAdmin.d.ts +0 -226
  25. package/dist/nord/client/NordAdmin.js +0 -410
  26. package/dist/nord/client/NordClient.d.ts +0 -16
  27. package/dist/nord/client/NordClient.js +0 -28
  28. package/dist/nord/client/NordUser.d.ts +0 -379
  29. package/dist/nord/client/NordUser.js +0 -787
  30. package/dist/nord/index.d.ts +0 -8
  31. package/dist/nord/index.js +0 -34
  32. package/dist/nord/models/Subscriber.d.ts +0 -37
  33. package/dist/nord/models/Subscriber.js +0 -25
  34. package/dist/nord/utils/NordError.d.ts +0 -35
  35. package/dist/nord/utils/NordError.js +0 -49
  36. package/dist/types.js +0 -92
  37. package/dist/utils.js +0 -193
  38. package/dist/websocket/NordWebSocketClient.js +0 -242
  39. package/dist/websocket/Subscriber.js +0 -24
  40. package/dist/websocket/events.js +0 -1
  41. package/dist/websocket/index.js +0 -80
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
- }