@levrbet/shared 0.1.132 → 0.1.134

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 (95) hide show
  1. package/dist/core/contracts/abis/LevrBaseMarket.d.ts +1009 -0
  2. package/dist/core/contracts/abis/LevrBaseMarket.js +976 -0
  3. package/dist/core/contracts/abis/LevrBaseMarket.js.map +1 -0
  4. package/dist/core/contracts/abis/LevrConfigProvider.d.ts +1918 -2130
  5. package/dist/core/contracts/abis/LevrConfigProvider.js +2007 -1162
  6. package/dist/core/contracts/abis/LevrConfigProvider.js.map +1 -1
  7. package/dist/core/contracts/abis/LevrFundManager.d.ts +50 -369
  8. package/dist/core/contracts/abis/LevrFundManager.js +1 -180
  9. package/dist/core/contracts/abis/LevrFundManager.js.map +1 -1
  10. package/dist/core/contracts/abis/LevrLiquidationEngine.d.ts +163 -153
  11. package/dist/core/contracts/abis/LevrLiquidationEngine.js +182 -81
  12. package/dist/core/contracts/abis/LevrLiquidationEngine.js.map +1 -1
  13. package/dist/core/contracts/abis/LevrManager.d.ts +978 -1018
  14. package/dist/core/contracts/abis/LevrManager.js +835 -453
  15. package/dist/core/contracts/abis/LevrManager.js.map +1 -1
  16. package/dist/core/contracts/abis/LevrMarketFeed.d.ts +515 -515
  17. package/dist/core/contracts/abis/LevrMarketFeed.js +620 -272
  18. package/dist/core/contracts/abis/LevrMarketFeed.js.map +1 -1
  19. package/dist/core/contracts/abis/LevrMarketRouter.d.ts +159 -289
  20. package/dist/core/contracts/abis/LevrMarketRouter.js +188 -133
  21. package/dist/core/contracts/abis/LevrMarketRouter.js.map +1 -1
  22. package/dist/core/contracts/abis/LevrMvpRouter.d.ts +160 -414
  23. package/dist/core/contracts/abis/LevrMvpRouter.js +227 -194
  24. package/dist/core/contracts/abis/LevrMvpRouter.js.map +1 -1
  25. package/dist/core/contracts/abis/LevrOrderbook.d.ts +367 -562
  26. package/dist/core/contracts/abis/LevrOrderbook.js +409 -256
  27. package/dist/core/contracts/abis/LevrOrderbook.js.map +1 -1
  28. package/dist/core/contracts/abis/LevrUtil.d.ts +3 -3
  29. package/dist/core/contracts/abis/LevrUtil.js +3 -3
  30. package/dist/core/contracts/abis/LevrUtil.js.map +1 -1
  31. package/dist/core/contracts/abis/Storage.d.ts +34 -0
  32. package/dist/core/contracts/abis/Storage.js +47 -0
  33. package/dist/core/contracts/abis/Storage.js.map +1 -0
  34. package/dist/core/contracts/abis/index.d.ts +8470 -9575
  35. package/dist/core/contracts/abis/index.js +13 -9
  36. package/dist/core/contracts/abis/index.js.map +1 -1
  37. package/dist/core/contracts/addresses.d.ts +92 -114
  38. package/dist/core/contracts/addresses.js +85 -108
  39. package/dist/core/contracts/addresses.js.map +1 -1
  40. package/dist/core/contracts/constants.d.ts +3 -2
  41. package/dist/core/contracts/constants.js +5 -3
  42. package/dist/core/contracts/constants.js.map +1 -1
  43. package/dist/core/types/oracle/market/index.d.ts +1 -0
  44. package/dist/core/types/oracle/market/index.js +1 -0
  45. package/dist/core/types/oracle/market/index.js.map +1 -1
  46. package/dist/core/types/oracle/market/positions.types.d.ts +45 -0
  47. package/dist/core/types/oracle/market/positions.types.js +3 -0
  48. package/dist/core/types/oracle/market/positions.types.js.map +1 -0
  49. package/dist/core/types/oracle/requests/game.request.types.d.ts +1 -9
  50. package/dist/core/types/oracle/requests/game.request.types.js +2 -9
  51. package/dist/core/types/oracle/requests/game.request.types.js.map +1 -1
  52. package/dist/core/utils/index.d.ts +1 -0
  53. package/dist/core/utils/index.js +1 -0
  54. package/dist/core/utils/index.js.map +1 -1
  55. package/dist/core/utils/position.utils.d.ts +18 -0
  56. package/dist/core/utils/position.utils.js +68 -0
  57. package/dist/core/utils/position.utils.js.map +1 -0
  58. package/dist/react/hooks/contracts/useContracts.d.ts +84 -80
  59. package/dist/server/config/kms.d.ts +1 -1
  60. package/dist/server/config/kms.js +5 -1
  61. package/dist/server/config/kms.js.map +1 -1
  62. package/dist/server/config/prisma.js +5 -1
  63. package/dist/server/config/prisma.js.map +1 -1
  64. package/dist/server/config/redis.js +6 -5
  65. package/dist/server/config/redis.js.map +1 -1
  66. package/dist/server/config/winston.d.ts +12 -0
  67. package/dist/server/config/winston.js +95 -5
  68. package/dist/server/config/winston.js.map +1 -1
  69. package/dist/server/contracts/clients/ozRelayerService.js +12 -12
  70. package/dist/server/contracts/clients/ozRelayerService.js.map +1 -1
  71. package/dist/server/index.d.ts +0 -1
  72. package/dist/server/index.js +0 -1
  73. package/dist/server/index.js.map +1 -1
  74. package/dist/server/middleware/auth/cloudflare.handler.js +5 -1
  75. package/dist/server/middleware/auth/cloudflare.handler.js.map +1 -1
  76. package/dist/server/middleware/auth/hmac.handler.js +2 -2
  77. package/dist/server/middleware/auth/hmac.handler.js.map +1 -1
  78. package/dist/server/middleware/multiAuth.examples.js +12 -8
  79. package/dist/server/middleware/multiAuth.examples.js.map +1 -1
  80. package/dist/server/oracle/redis-cache-manager/market.cache.service.js +2 -2
  81. package/dist/server/oracle/redis-cache-manager/market.cache.service.js.map +1 -1
  82. package/dist/server/oracle/rmq-manager/base.queue.manager.js +1 -1
  83. package/dist/server/oracle/rmq-manager/base.queue.manager.js.map +1 -1
  84. package/dist/server/services/crypto.service.js +1 -1
  85. package/dist/server/services/crypto.service.js.map +1 -1
  86. package/dist/server/test-relayers.d.ts +1 -0
  87. package/dist/server/test-relayers.js +17 -0
  88. package/dist/server/test-relayers.js.map +1 -0
  89. package/package.json +1 -1
  90. package/dist/server/logging/coralogix.logger.d.ts +0 -86
  91. package/dist/server/logging/coralogix.logger.js +0 -138
  92. package/dist/server/logging/coralogix.logger.js.map +0 -1
  93. package/dist/server/logging/index.d.ts +0 -1
  94. package/dist/server/logging/index.js +0 -18
  95. package/dist/server/logging/index.js.map +0 -1
@@ -1,86 +0,0 @@
1
- import { LoggerConfig, Log, Severity } from "coralogix-logger";
2
- /**
3
- * Service class for handling logging operations using Coralogix
4
- */
5
- export declare class CoralogixLoggerService {
6
- private readonly logger;
7
- /**
8
- * Creates a new instance of CoralogixLoggerService
9
- * @param category - The category name for the logger
10
- * @param config - The configuration settings for Coralogix
11
- */
12
- constructor(category: string, config: {
13
- applicationName: string;
14
- privateKey: string;
15
- subsystemName: string;
16
- });
17
- /**
18
- * Creates a default configuration for the Coralogix logger
19
- * @param applicationName - The name of the application
20
- * @param privateKey - The private key for Coralogix authentication
21
- * @param subsystemName - The name of the subsystem
22
- * @returns A LoggerConfig instance with the specified settings
23
- */
24
- static createDefaultConfig(applicationName: string, privateKey: string, subsystemName: string): LoggerConfig;
25
- /**
26
- * Creates a new log entry
27
- * @param severity - The severity level of the log
28
- * @param className - The name of the class where the log is created
29
- * @param methodName - The name of the method where the log is created
30
- * @param text - The message text to log
31
- * @returns A Log instance with the specified parameters
32
- */
33
- createLog(severity: Severity, className: string, methodName: string, text: string): Log;
34
- /**
35
- * Adds a log entry to the logger
36
- * @param log - The log entry to add
37
- */
38
- addLog(log: Log): void;
39
- /**
40
- * Logs a message with the specified severity level
41
- * @param severity - The severity level of the log
42
- * @param className - The name of the class where the log is created
43
- * @param methodName - The name of the method where the log is created
44
- * @param text - The message text to log
45
- */
46
- logMessage(severity: Severity, className: string, methodName: string, text: string): void;
47
- /**
48
- * Logs an error message
49
- * @param className - The name of the class where the error occurred
50
- * @param methodName - The name of the method where the error occurred
51
- * @param error - The Error object containing the error details
52
- */
53
- logError(className: string, methodName: string, error: unknown): void;
54
- /**
55
- * Logs a warning message
56
- * @param className - The name of the class generating the warning
57
- * @param methodName - The name of the method generating the warning
58
- * @param text - The warning message text
59
- */
60
- logWarning(className: string, methodName: string, text: string): void;
61
- /**
62
- * Logs an informational message
63
- * @param className - The name of the class generating the info
64
- * @param methodName - The name of the method generating the info
65
- * @param text - The info message text
66
- */
67
- logInfo(className: string, methodName: string, text: string): void;
68
- /**
69
- * Logs a debug message
70
- * @param className - The name of the class generating the debug message
71
- * @param methodName - The name of the method generating the debug message
72
- * @param text - The debug message text
73
- */
74
- logDebug(className: string, methodName: string, text: string): void;
75
- /**
76
- * Logs a verbose message
77
- * @param className - The name of the class generating the verbose message
78
- * @param methodName - The name of the method generating the verbose message
79
- * @param text - The verbose message text
80
- */
81
- logVerbose(className: string, methodName: string, text: string): void;
82
- /**
83
- * Closes the Coralogix logger
84
- */
85
- close(): void;
86
- }
@@ -1,138 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CoralogixLoggerService = void 0;
4
- const coralogix_logger_1 = require("coralogix-logger");
5
- /**
6
- * Service class for handling logging operations using Coralogix
7
- */
8
- class CoralogixLoggerService {
9
- /**
10
- * Creates a new instance of CoralogixLoggerService
11
- * @param category - The category name for the logger
12
- * @param config - The configuration settings for Coralogix
13
- */
14
- constructor(category, config) {
15
- const loggerConfig = new coralogix_logger_1.LoggerConfig({
16
- applicationName: config.applicationName,
17
- privateKey: config.privateKey,
18
- subsystemName: config.subsystemName,
19
- });
20
- coralogix_logger_1.CoralogixLogger.configure(loggerConfig);
21
- this.logger = new coralogix_logger_1.CoralogixLogger(category);
22
- }
23
- /**
24
- * Creates a default configuration for the Coralogix logger
25
- * @param applicationName - The name of the application
26
- * @param privateKey - The private key for Coralogix authentication
27
- * @param subsystemName - The name of the subsystem
28
- * @returns A LoggerConfig instance with the specified settings
29
- */
30
- static createDefaultConfig(applicationName, privateKey, subsystemName) {
31
- return new coralogix_logger_1.LoggerConfig({
32
- applicationName,
33
- privateKey,
34
- subsystemName,
35
- });
36
- }
37
- /**
38
- * Creates a new log entry
39
- * @param severity - The severity level of the log
40
- * @param className - The name of the class where the log is created
41
- * @param methodName - The name of the method where the log is created
42
- * @param text - The message text to log
43
- * @returns A Log instance with the specified parameters
44
- */
45
- createLog(severity, className, methodName, text) {
46
- return new coralogix_logger_1.Log({
47
- severity,
48
- className,
49
- methodName,
50
- text,
51
- });
52
- }
53
- /**
54
- * Adds a log entry to the logger
55
- * @param log - The log entry to add
56
- */
57
- addLog(log) {
58
- this.logger.addLog(log);
59
- }
60
- /**
61
- * Logs a message with the specified severity level
62
- * @param severity - The severity level of the log
63
- * @param className - The name of the class where the log is created
64
- * @param methodName - The name of the method where the log is created
65
- * @param text - The message text to log
66
- */
67
- logMessage(severity, className, methodName, text) {
68
- const log = this.createLog(severity, className, methodName, text);
69
- this.addLog(log);
70
- }
71
- /**
72
- * Logs an error message
73
- * @param className - The name of the class where the error occurred
74
- * @param methodName - The name of the method where the error occurred
75
- * @param error - The Error object containing the error details
76
- */
77
- logError(className, methodName, error) {
78
- let log;
79
- if (error instanceof Error) {
80
- log = this.createLog(coralogix_logger_1.Severity.error, className, methodName, error.message);
81
- }
82
- else if (typeof error === "string") {
83
- log = this.createLog(coralogix_logger_1.Severity.error, className, methodName, error);
84
- }
85
- else {
86
- log = this.createLog(coralogix_logger_1.Severity.error, className, methodName, JSON.stringify(error));
87
- }
88
- this.addLog(log);
89
- }
90
- /**
91
- * Logs a warning message
92
- * @param className - The name of the class generating the warning
93
- * @param methodName - The name of the method generating the warning
94
- * @param text - The warning message text
95
- */
96
- logWarning(className, methodName, text) {
97
- const log = this.createLog(coralogix_logger_1.Severity.warning, className, methodName, text);
98
- this.addLog(log);
99
- }
100
- /**
101
- * Logs an informational message
102
- * @param className - The name of the class generating the info
103
- * @param methodName - The name of the method generating the info
104
- * @param text - The info message text
105
- */
106
- logInfo(className, methodName, text) {
107
- const log = this.createLog(coralogix_logger_1.Severity.info, className, methodName, text);
108
- this.addLog(log);
109
- }
110
- /**
111
- * Logs a debug message
112
- * @param className - The name of the class generating the debug message
113
- * @param methodName - The name of the method generating the debug message
114
- * @param text - The debug message text
115
- */
116
- logDebug(className, methodName, text) {
117
- const log = this.createLog(coralogix_logger_1.Severity.debug, className, methodName, text);
118
- this.addLog(log);
119
- }
120
- /**
121
- * Logs a verbose message
122
- * @param className - The name of the class generating the verbose message
123
- * @param methodName - The name of the method generating the verbose message
124
- * @param text - The verbose message text
125
- */
126
- logVerbose(className, methodName, text) {
127
- const log = this.createLog(coralogix_logger_1.Severity.verbose, className, methodName, text);
128
- this.addLog(log);
129
- }
130
- /**
131
- * Closes the Coralogix logger
132
- */
133
- close() {
134
- coralogix_logger_1.CoralogixLogger.close();
135
- }
136
- }
137
- exports.CoralogixLoggerService = CoralogixLoggerService;
138
- //# sourceMappingURL=coralogix.logger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"coralogix.logger.js","sourceRoot":"","sources":["../../../src/server/logging/coralogix.logger.ts"],"names":[],"mappings":";;;AAAA,uDAA+E;AAE/E;;GAEG;AACH,MAAa,sBAAsB;IAG/B;;;;OAIG;IACH,YACI,QAAgB,EAChB,MAIC;QAED,MAAM,YAAY,GAAG,IAAI,+BAAY,CAAC;YAClC,eAAe,EAAE,MAAM,CAAC,eAAe;YACvC,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,aAAa,EAAE,MAAM,CAAC,aAAa;SACtC,CAAC,CAAA;QACF,kCAAe,CAAC,SAAS,CAAC,YAAY,CAAC,CAAA;QACvC,IAAI,CAAC,MAAM,GAAG,IAAI,kCAAe,CAAC,QAAQ,CAAC,CAAA;IAC/C,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,mBAAmB,CAAC,eAAuB,EAAE,UAAkB,EAAE,aAAqB;QACzF,OAAO,IAAI,+BAAY,CAAC;YACpB,eAAe;YACf,UAAU;YACV,aAAa;SAChB,CAAC,CAAA;IACN,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,QAAkB,EAAE,SAAiB,EAAE,UAAkB,EAAE,IAAY;QAC7E,OAAO,IAAI,sBAAG,CAAC;YACX,QAAQ;YACR,SAAS;YACT,UAAU;YACV,IAAI;SACP,CAAC,CAAA;IACN,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,GAAQ;QACX,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAC3B,CAAC;IAED;;;;;;OAMG;IACH,UAAU,CAAC,QAAkB,EAAE,SAAiB,EAAE,UAAkB,EAAE,IAAY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AAE,IAAI,CAAC,CAAA;QACtE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IACpB,CAAC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,SAAiB,EAAE,UAAkB,EAAE,IAAY;QACxD,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,2BAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,CAAA;QACvE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IACpB,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,SAAiB,EAAE,UAAkB,EAAE,IAAY;QAC1D,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,2BAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,CAAA;QACzE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IACpB,CAAC;IAED;;OAEG;IACH,KAAK;QACD,kCAAe,CAAC,KAAK,EAAE,CAAA;IAC3B,CAAC;CACJ;AAjJD,wDAiJC"}
@@ -1 +0,0 @@
1
- export * from "./coralogix.logger";
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./coralogix.logger"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server/logging/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAkC"}