@n1xyz/nord-ts 0.3.1 → 0.3.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/client/Nord.d.ts +9 -3
- package/dist/gen/openapi.d.ts +366 -4
- package/dist/index.browser.js +96626 -0
- package/dist/index.common.js +115002 -0
- package/dist/types.d.ts +13 -2
- package/dist/websocket/NordWebSocketClient.d.ts +1 -0
- package/dist/websocket/Subscriber.d.ts +7 -1
- package/dist/websocket/events.d.ts +2 -1
- package/dist/websocket/index.d.ts +1 -1
- package/package.json +7 -4
- package/dist/actions.js +0 -184
- package/dist/client/Nord.js +0 -759
- package/dist/client/NordAdmin.js +0 -362
- package/dist/client/NordUser.js +0 -752
- package/dist/const.js +0 -27
- package/dist/error.js +0 -51
- package/dist/gen/nord_pb.js +0 -1068
- package/dist/gen/openapi.js +0 -5
- package/dist/index.js +0 -10
- package/dist/nord/api/actions.d.ts +0 -128
- package/dist/nord/api/actions.js +0 -396
- package/dist/nord/api/core.d.ts +0 -16
- package/dist/nord/api/core.js +0 -81
- package/dist/nord/api/metrics.d.ts +0 -67
- package/dist/nord/api/metrics.js +0 -229
- package/dist/nord/api/triggers.d.ts +0 -7
- package/dist/nord/api/triggers.js +0 -38
- package/dist/nord/client/Nord.d.ts +0 -387
- package/dist/nord/client/Nord.js +0 -747
- package/dist/nord/client/NordAdmin.d.ts +0 -226
- package/dist/nord/client/NordAdmin.js +0 -410
- package/dist/nord/client/NordClient.d.ts +0 -16
- package/dist/nord/client/NordClient.js +0 -28
- package/dist/nord/client/NordUser.d.ts +0 -379
- package/dist/nord/client/NordUser.js +0 -787
- package/dist/nord/index.d.ts +0 -8
- package/dist/nord/index.js +0 -34
- package/dist/nord/models/Subscriber.d.ts +0 -37
- package/dist/nord/models/Subscriber.js +0 -25
- package/dist/nord/utils/NordError.d.ts +0 -35
- package/dist/nord/utils/NordError.js +0 -49
- package/dist/types.js +0 -92
- package/dist/utils.js +0 -193
- package/dist/websocket/NordWebSocketClient.js +0 -242
- package/dist/websocket/Subscriber.js +0 -24
- package/dist/websocket/events.js +0 -1
- 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
|
-
}
|