@ultrade/shared 1.0.0

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 (189) hide show
  1. package/dist/baseModel/base.model.d.ts +26 -0
  2. package/dist/baseModel/index.d.ts +2 -0
  3. package/dist/common/auth.helper.d.ts +4 -0
  4. package/dist/common/auth.helper.js +367 -0
  5. package/dist/common/awsKms.d.ts +2 -0
  6. package/dist/common/awsKms.js +265 -0
  7. package/dist/common/big-number.helper.d.ts +38 -0
  8. package/dist/common/big-number.helper.js +263 -0
  9. package/dist/common/index.d.ts +11 -0
  10. package/dist/common/index.js +2541 -0
  11. package/dist/common/indexer.helper.d.ts +2 -0
  12. package/dist/common/indexer.helper.js +387 -0
  13. package/dist/common/logger.d.ts +32 -0
  14. package/dist/common/logger.js +188 -0
  15. package/dist/common/mappers/codexAsset.mapper.d.ts +2 -0
  16. package/dist/common/mappers/codexAsset.mapper.js +40 -0
  17. package/dist/common/mappers/codexBalance.mapper.d.ts +2 -0
  18. package/dist/common/mappers/codexBalance.mapper.js +38 -0
  19. package/dist/common/mappers/index.d.ts +3 -0
  20. package/dist/common/mappers/index.js +1421 -0
  21. package/dist/common/mappers/trade.mapper.d.ts +6 -0
  22. package/dist/common/mappers/trade.mapper.js +1343 -0
  23. package/dist/common/migration.helpers.d.ts +4 -0
  24. package/dist/common/migration.helpers.js +44 -0
  25. package/dist/common/redis.helper.d.ts +27 -0
  26. package/dist/common/redis.helper.js +269 -0
  27. package/dist/common/secret.helper.d.ts +28 -0
  28. package/dist/common/secret.helper.js +144 -0
  29. package/dist/common/timestamp.helper.d.ts +1 -0
  30. package/dist/common/timestamp.helper.js +41 -0
  31. package/dist/common/utils/assert.d.ts +1 -0
  32. package/dist/common/utils/assert.js +32 -0
  33. package/dist/common/utils/decode.d.ts +5 -0
  34. package/dist/common/utils/decode.js +206 -0
  35. package/dist/common/utils/index.d.ts +9 -0
  36. package/dist/common/utils/index.js +122 -0
  37. package/dist/common/utils/social.d.ts +1 -0
  38. package/dist/common/utils/social.js +30 -0
  39. package/dist/common/utils/stat.d.ts +1 -0
  40. package/dist/common/utils/stat.js +274 -0
  41. package/dist/constants/allowedUrls.d.ts +1 -0
  42. package/dist/constants/auth.d.ts +2 -0
  43. package/dist/constants/cctp.d.ts +3 -0
  44. package/dist/constants/codex.d.ts +11 -0
  45. package/dist/constants/env.d.ts +6 -0
  46. package/dist/constants/index.d.ts +7 -0
  47. package/dist/constants/index.js +455 -0
  48. package/dist/constants/queue.d.ts +39 -0
  49. package/dist/constants/response.d.ts +82 -0
  50. package/dist/constants/settings.d.ts +2 -0
  51. package/dist/constants/social.d.ts +3 -0
  52. package/dist/constants/withdrawalWalletsMessage.d.ts +1 -0
  53. package/dist/enums/chains.enum.d.ts +50 -0
  54. package/dist/enums/db/account/index.d.ts +19 -0
  55. package/dist/enums/db/affiliate.enum.d.ts +7 -0
  56. package/dist/enums/db/available-pair-settings.enum.d.ts +12 -0
  57. package/dist/enums/db/chains.d.ts +30 -0
  58. package/dist/enums/db/common.enum.d.ts +4 -0
  59. package/dist/enums/db/component/index.d.ts +22 -0
  60. package/dist/enums/db/index.d.ts +21 -0
  61. package/dist/enums/db/market-maker.enum.d.ts +15 -0
  62. package/dist/enums/db/notification-center/userNotification.enum.d.ts +36 -0
  63. package/dist/enums/db/order-side.enum.d.ts +5 -0
  64. package/dist/enums/db/order-status.enum.d.ts +8 -0
  65. package/dist/enums/db/order-type.enum.d.ts +7 -0
  66. package/dist/enums/db/pending-actions.enum.d.ts +6 -0
  67. package/dist/enums/db/relayer.enum.d.ts +23 -0
  68. package/dist/enums/db/setting-type.enum.d.ts +8 -0
  69. package/dist/enums/db/social-action.enum.d.ts +24 -0
  70. package/dist/enums/db/social-prompt.enum.d.ts +8 -0
  71. package/dist/enums/db/social.enum.d.ts +10 -0
  72. package/dist/enums/db/state-type.enum.d.ts +9 -0
  73. package/dist/enums/db/trade.enums.d.ts +10 -0
  74. package/dist/enums/db/tradingKeyType.enum.d.ts +4 -0
  75. package/dist/enums/db/upgrade.enum.d.ts +5 -0
  76. package/dist/enums/db/withdrawal-wallet.enum.d.ts +5 -0
  77. package/dist/enums/index.d.ts +5 -0
  78. package/dist/enums/index.js +893 -0
  79. package/dist/enums/maintenanceMode.enum.d.ts +10 -0
  80. package/dist/enums/notification.enum.d.ts +7 -0
  81. package/dist/enums/social.enum.d.ts +10 -0
  82. package/dist/helpers/Encoding.d.ts +33 -0
  83. package/dist/helpers/Encoding.js +318 -0
  84. package/dist/helpers/algo.helper.d.ts +14 -0
  85. package/dist/helpers/algo.helper.js +1211 -0
  86. package/dist/helpers/api.helper.d.ts +16 -0
  87. package/dist/helpers/api.helper.js +1652 -0
  88. package/dist/helpers/assert.helper.d.ts +10 -0
  89. package/dist/helpers/assert.helper.js +1677 -0
  90. package/dist/helpers/atomic.helper.d.ts +21 -0
  91. package/dist/helpers/atomic.helper.js +712 -0
  92. package/dist/helpers/balance.helper.d.ts +13 -0
  93. package/dist/helpers/balance.helper.js +4330 -0
  94. package/dist/helpers/codex/common.helper.d.ts +24 -0
  95. package/dist/helpers/codex/common.helper.js +4246 -0
  96. package/dist/helpers/codex/index.d.ts +6 -0
  97. package/dist/helpers/codex/index.js +4246 -0
  98. package/dist/helpers/codex/mbr.helper.d.ts +6 -0
  99. package/dist/helpers/codex/mbr.helper.js +4246 -0
  100. package/dist/helpers/codex/mna.helper.d.ts +2 -0
  101. package/dist/helpers/codex/mna.helper.js +4246 -0
  102. package/dist/helpers/codex/order.helper.d.ts +6 -0
  103. package/dist/helpers/codex/order.helper.js +4246 -0
  104. package/dist/helpers/codex/setGlobal.helper.d.ts +27 -0
  105. package/dist/helpers/codex/setGlobal.helper.js +4312 -0
  106. package/dist/helpers/codex/transfer.helper.d.ts +21 -0
  107. package/dist/helpers/codex/transfer.helper.js +4246 -0
  108. package/dist/helpers/codex/txn.helper.d.ts +13 -0
  109. package/dist/helpers/codex/txn.helper.js +4246 -0
  110. package/dist/helpers/codex.helper.d.ts +106 -0
  111. package/dist/helpers/codex.helper.js +4246 -0
  112. package/dist/helpers/email.helper.d.ts +5 -0
  113. package/dist/helpers/email.helper.js +112 -0
  114. package/dist/helpers/eth.helper.d.ts +12 -0
  115. package/dist/helpers/eth.helper.js +4246 -0
  116. package/dist/helpers/hummingbots.helper.d.ts +2 -0
  117. package/dist/helpers/hummingbots.helper.js +163 -0
  118. package/dist/helpers/index.d.ts +5 -0
  119. package/dist/helpers/index.js +837 -0
  120. package/dist/helpers/interval.helpers.d.ts +9 -0
  121. package/dist/helpers/interval.helpers.js +110 -0
  122. package/dist/helpers/liquidity.helper.d.ts +6 -0
  123. package/dist/helpers/liquidity.helper.js +81 -0
  124. package/dist/helpers/order.helper.d.ts +7 -0
  125. package/dist/helpers/order.helper.js +946 -0
  126. package/dist/helpers/pair.helper.d.ts +9 -0
  127. package/dist/helpers/pair.helper.js +938 -0
  128. package/dist/helpers/pointSystem.helper.d.ts +14 -0
  129. package/dist/helpers/pointSystem.helper.js +392 -0
  130. package/dist/helpers/ticker.helpers.d.ts +8 -0
  131. package/dist/helpers/ticker.helpers.js +358 -0
  132. package/dist/helpers/vaa.helper.d.ts +2 -0
  133. package/dist/helpers/vaa.helper.js +4350 -0
  134. package/dist/helpers/withdraw.helper.d.ts +14 -0
  135. package/dist/helpers/withdraw.helper.js +4784 -0
  136. package/dist/interfaces/accountInfo.interface.d.ts +15 -0
  137. package/dist/interfaces/algostreamer/index.d.ts +49 -0
  138. package/dist/interfaces/api/affiliate.interface.d.ts +71 -0
  139. package/dist/interfaces/cache.interface.d.ts +25 -0
  140. package/dist/interfaces/confirmed-txn.interface.d.ts +46 -0
  141. package/dist/interfaces/controller.interface.d.ts +6 -0
  142. package/dist/interfaces/db/baseModel.interface.d.ts +5 -0
  143. package/dist/interfaces/db/hummingbot/index.d.ts +18 -0
  144. package/dist/interfaces/db/index.d.ts +10 -0
  145. package/dist/interfaces/db/market/index.d.ts +313 -0
  146. package/dist/interfaces/db/marketing/index.d.ts +48 -0
  147. package/dist/interfaces/db/notification_center/index.d.ts +33 -0
  148. package/dist/interfaces/db/relayer/index.d.ts +56 -0
  149. package/dist/interfaces/db/social/index.d.ts +188 -0
  150. package/dist/interfaces/db/softDeleteModel.interface.d.ts +4 -0
  151. package/dist/interfaces/db/white_label/index.d.ts +161 -0
  152. package/dist/interfaces/db/withdrawal_wallets/index.d.ts +12 -0
  153. package/dist/interfaces/dto/index.d.ts +62 -0
  154. package/dist/interfaces/emailService.interface.d.ts +4 -0
  155. package/dist/interfaces/index.d.ts +17 -0
  156. package/dist/interfaces/index.js +1319 -0
  157. package/dist/interfaces/kmsService.interface.d.ts +4 -0
  158. package/dist/interfaces/last-look-trade.interface.d.ts +10 -0
  159. package/dist/interfaces/market.interface.d.ts +17 -0
  160. package/dist/interfaces/order.interface.d.ts +162 -0
  161. package/dist/interfaces/pair.interface.d.ts +10 -0
  162. package/dist/interfaces/query.interface.d.ts +6 -0
  163. package/dist/interfaces/services/accountCache.interface.d.ts +15 -0
  164. package/dist/interfaces/services/algod.interface.d.ts +5 -0
  165. package/dist/interfaces/services/balances.interface.d.ts +11 -0
  166. package/dist/interfaces/services/coin-market-cap.interface.d.ts +124 -0
  167. package/dist/interfaces/services/index.d.ts +8 -0
  168. package/dist/interfaces/services/price-model.interface.d.ts +4 -0
  169. package/dist/interfaces/services/price-service.interface.d.ts +8 -0
  170. package/dist/interfaces/services/socialActivity.interface.d.ts +48 -0
  171. package/dist/interfaces/services/tmc.interface.d.ts +9 -0
  172. package/dist/interfaces/streaming.interface.d.ts +95 -0
  173. package/dist/interfaces/timestream.interface.d.ts +29 -0
  174. package/dist/interfaces/trading.interface.d.ts +235 -0
  175. package/dist/interfaces/tradingKey.interface.d.ts +26 -0
  176. package/dist/interfaces/transfer.interface.d.ts +12 -0
  177. package/dist/interfaces/wallet.interface.d.ts +89 -0
  178. package/dist/interfaces/withdrawalWallets.interface.d.ts +14 -0
  179. package/dist/types/algo-order.type.d.ts +10 -0
  180. package/dist/types/amm/amm.d.ts +163 -0
  181. package/dist/types/api/request.types.d.ts +99 -0
  182. package/dist/types/codex.types.d.ts +28 -0
  183. package/dist/types/hummingbots.types.d.ts +23 -0
  184. package/dist/types/index.d.ts +8 -0
  185. package/dist/types/index.js +362 -0
  186. package/dist/types/notification.type.d.ts +10 -0
  187. package/dist/types/settings.type.d.ts +162 -0
  188. package/dist/types/state.type.d.ts +4 -0
  189. package/package.json +78 -0
@@ -0,0 +1,712 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("bignumber.js"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["bignumber.js"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("bignumber.js")) : factory(root["bignumber.js"]);
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
10
+ })(global, (__WEBPACK_EXTERNAL_MODULE__6168__) => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ "use strict";
13
+ /******/ var __webpack_modules__ = ({
14
+
15
+ /***/ 661:
16
+ /***/ ((__unused_webpack_module, exports) => {
17
+
18
+
19
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
20
+ exports.WITHDRAW_DATA_BYTES_LENGTH = exports.SHARE_DATA_LENGTH = exports.MAX_TOKEN_DECIMAL = exports.ORDER_MSG_VERSION = exports.ORDER_DATA_BYTES_LENGTH = exports.MIN_ORDER_EXPIRATION_MINS = exports.DEFAULT_ORDER_EXPIRATION_DAYS = exports.DEFAULT_FEE_SHARE = exports.FRONTEND_FEE_SCALE = exports.FEE_SCALE = exports.FACTOR_PRICE_DECIMAL = void 0;
21
+ exports.FACTOR_PRICE_DECIMAL = 18;
22
+ exports.FEE_SCALE = 100000;
23
+ exports.FRONTEND_FEE_SCALE = exports.FEE_SCALE / 100;
24
+ exports.DEFAULT_FEE_SHARE = 90000;
25
+ exports.DEFAULT_ORDER_EXPIRATION_DAYS = 30;
26
+ exports.MIN_ORDER_EXPIRATION_MINS = 60;
27
+ exports.ORDER_DATA_BYTES_LENGTH = 328;
28
+ exports.ORDER_MSG_VERSION = 1;
29
+ exports.MAX_TOKEN_DECIMAL = 18;
30
+ exports.SHARE_DATA_LENGTH = 36;
31
+ exports.WITHDRAW_DATA_BYTES_LENGTH = 248;
32
+
33
+
34
+ /***/ }),
35
+
36
+ /***/ 935:
37
+ /***/ ((__unused_webpack_module, exports) => {
38
+
39
+
40
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
41
+ exports.SERVER = exports.CALCULATIONS = exports.BIGNUMBER = exports.RES_MSG = exports.RESPONSES = void 0;
42
+ exports.RESPONSES = {
43
+ SUCCESS: 200,
44
+ CREATED: 201,
45
+ ACCEPTED: 202,
46
+ NOCONTENT: 204,
47
+ BADREQUEST: 400,
48
+ FORBIDDEN: 403,
49
+ NOTFOUND: 404,
50
+ TIMEOUT: 408,
51
+ TOOMANYREQ: 429,
52
+ INTERNALSERVER: 500,
53
+ BADGATEWAYS: 502,
54
+ SERVICEUNAVILABLE: 503,
55
+ GATEWAYTIMEOUT: 504,
56
+ };
57
+ exports.RES_MSG = {
58
+ INSERT: 'Data has been saved successfully.',
59
+ ERROR: 'Some error has been occured. Please try again.',
60
+ SUCCESS: 'Your request is executed successfully!',
61
+ REQUIRED: 'coin_type or price param is required',
62
+ CAPTCHATEXTNOTFOUND: 'Captcha text not found.',
63
+ CAPTCHA_VERIFICATION_FAILED: 'Captcha is not verified.',
64
+ NOTEMPTY: 'coin_type or price should not be empty',
65
+ PAIR_LIST: 'Pair list',
66
+ PAIR_STATUS: 'Pair status has been changed',
67
+ ACTIVE_USERS: 'Active Users',
68
+ SETTINGS_NOT_FOUND: 'No settings found in DB.',
69
+ TRADE_IS_HALT: 'Trading is disabled.',
70
+ KYC_REQUIRED: 'KYC is required for this action.',
71
+ EMAIL_NOT_VERIFIED: 'Your email is not verified.Please verify first.',
72
+ NOT_BETA_USER: 'Trade only works for beta user.',
73
+ WRONG_PAIR_KEY: 'Pair key not found.',
74
+ PAIRDISABLED: 'Temporarily order placement has been disabled for this pair. Please try again later.',
75
+ BALANCE_NOT_SUFFICIENT: 'You have insufficient balance.',
76
+ MIN_TRADE_NOT_MATCHED: 'Minimum trade limit does not matched.',
77
+ ORDER_PLACED_SUCCESSFULLY: 'Order has been placed successfully.',
78
+ ORDER_NOT_FOUND: 'Sorry this order id does not found.',
79
+ ORDER_ALREADY_MATCHED: 'Order already matched.',
80
+ ORDER_ALREADY_CANCELED: 'Order already cancelled.',
81
+ ORDER_CANCELED_SUCCESSFULLY: 'order successfully cancelled',
82
+ ORDER_LIST: 'Order list fetched successfully.',
83
+ ORDER_EXIT: 'Successfully exited from the position.',
84
+ PAIRERR: 'please provide pair param',
85
+ ORDERSIDE: 'side param is required',
86
+ ORDERTYPE: 'type param is required',
87
+ ORDERIDREQ: 'order_id param is required',
88
+ ORDERDETAIL: 'order detail',
89
+ COMMODITYORICE: 'commodity price',
90
+ COMMODITYSPOT: 'commodity spot updated',
91
+ TOKEN_INSERTED: 'ERC token has been added',
92
+ PARAMREQ: 'Parameter missing',
93
+ EXIST: 'Token Already Exist',
94
+ BREACHEDTOKENS: 'List of breached tokens',
95
+ API_EXPOSE: {
96
+ TOKEN_NOT_FOUND: 'Token not found, Please get token and set to header.',
97
+ ERROR: "Something went wrong, Please try again later"
98
+ },
99
+ LIMITED_UNITS: 'ONLY {{units}} units are available. You can place your order with this amount',
100
+ UNITS_UNAVAIL: 'Amount unavailable',
101
+ ORDER: {
102
+ ERROR: 'An error has been occured',
103
+ UNITS_UNAVAIL: 'Amount unavailable',
104
+ LIMITED_UNITS: 'ONLY {{units}} units are available. You can place your order with this amount',
105
+ PLACED: 'Order has been placed',
106
+ NOPARAMS: 'empty body params',
107
+ ORDER_NOT_FOUND: 'Sorry this order id not found.',
108
+ ORDER_ALREADY_MATCHED: 'Order already matched.',
109
+ ORDER_ALREADY_CANCELED: 'Order already cancelled.',
110
+ ORDER_CANCELED_SUCCESSFULLY: 'Order cancelled successfully',
111
+ },
112
+ DOMAIN_NOT_FOUND: 'domain not found',
113
+ };
114
+ exports.BIGNUMBER = {
115
+ SMALLESTUNIT: process.env.SMALLEST_UNIT,
116
+ };
117
+ exports.CALCULATIONS = {
118
+ SMALLEST_UNITS: process.env.SMALLEST_UNIT,
119
+ };
120
+ exports.SERVER = {
121
+ AVAILABLE_ASSETS_PER_USER: 1,
122
+ AVAILABLE_ASSETS_PER_IP: 3,
123
+ };
124
+
125
+
126
+ /***/ }),
127
+
128
+ /***/ 1174:
129
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
130
+
131
+
132
+ var __importDefault = (this && this.__importDefault) || function (mod) {
133
+ return (mod && mod.__esModule) ? mod : { "default": mod };
134
+ };
135
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
136
+ exports.Operations = void 0;
137
+ exports.absolute = absolute;
138
+ exports.ceil = ceil;
139
+ exports.toFixed = toFixed;
140
+ exports.floor = floor;
141
+ exports.round = round;
142
+ exports.plus = plus;
143
+ exports.minus = minus;
144
+ exports.multiply = multiply;
145
+ exports.toUsd = toUsd;
146
+ exports.divide = divide;
147
+ exports.greaterThanOrEqual = greaterThanOrEqual;
148
+ exports.greaterThan = greaterThan;
149
+ exports.lessThanOrEqual = lessThanOrEqual;
150
+ exports.lessThan = lessThan;
151
+ exports.equal = equal;
152
+ exports.mod = mod;
153
+ exports.modZero = modZero;
154
+ exports.bn_operation = bn_operation;
155
+ exports.roundNumber = roundNumber;
156
+ exports.convertFromBaseUnits = convertFromBaseUnits;
157
+ exports.convertToBaseUnits = convertToBaseUnits;
158
+ const bignumber_js_1 = __importDefault(__webpack_require__(6168));
159
+ bignumber_js_1.default.config({ DECIMAL_PLACES: 40, EXPONENTIAL_AT: 45 });
160
+ var Operations;
161
+ (function (Operations) {
162
+ Operations["MINUS"] = "-";
163
+ Operations["PLUS"] = "+";
164
+ Operations["MULTIPLY"] = "*";
165
+ Operations["DIVIDE"] = "/";
166
+ Operations["GREATER_THAN_OR_EQUAL"] = ">=";
167
+ Operations["GREATER_THAN"] = ">";
168
+ Operations["LESS_THAN_OR_EQUAL"] = "<=";
169
+ Operations["LESS_THAN"] = "<";
170
+ Operations["EQUAL"] = "==";
171
+ Operations["MOD"] = "mod";
172
+ })(Operations || (exports.Operations = Operations = {}));
173
+ function absolute(value) {
174
+ let x = new bignumber_js_1.default(value);
175
+ const res = x.abs().toString();
176
+ // console.log('Absolute value', { value, res })
177
+ return res;
178
+ }
179
+ function ceil(value) {
180
+ let x = new bignumber_js_1.default(String(value));
181
+ const res = x.integerValue(bignumber_js_1.default.ROUND_CEIL).toString();
182
+ if (!equal(value, res)) {
183
+ console.log('Ceil value', { value, res });
184
+ }
185
+ return res;
186
+ }
187
+ function toFixed(value, decimalPlaces, roundUpToFirstSignificant = false) {
188
+ const x = new bignumber_js_1.default(String(value));
189
+ let res;
190
+ if (roundUpToFirstSignificant) {
191
+ const valueStr = x.toFixed();
192
+ const decimalIndex = valueStr.indexOf('.');
193
+ if (decimalIndex >= 0) {
194
+ const fractionalPart = valueStr.slice(decimalIndex + 1);
195
+ let leadingZeros = 0;
196
+ for (let char of fractionalPart) {
197
+ if (char === '0') {
198
+ leadingZeros++;
199
+ }
200
+ else {
201
+ break;
202
+ }
203
+ }
204
+ const totalDecimalPlaces = leadingZeros + 1;
205
+ res = x.toFixed(totalDecimalPlaces, bignumber_js_1.default.ROUND_UP);
206
+ }
207
+ else {
208
+ res = x.toFixed(0);
209
+ }
210
+ }
211
+ else {
212
+ res = x.toFixed(decimalPlaces);
213
+ }
214
+ console.log('Fixed value', { value, res });
215
+ return res;
216
+ }
217
+ function floor(value) {
218
+ let x = new bignumber_js_1.default(String(value));
219
+ const res = x.integerValue(bignumber_js_1.default.ROUND_FLOOR).toString();
220
+ console.log('Floor value', { value, res });
221
+ return res;
222
+ }
223
+ function round(value) {
224
+ let x = new bignumber_js_1.default(String(value));
225
+ const res = x.integerValue(bignumber_js_1.default.ROUND_HALF_UP).toString();
226
+ console.log('Round value', { value, res });
227
+ return res;
228
+ }
229
+ function plus(value1, value2) {
230
+ return bn_operation(value1, value2, Operations.PLUS);
231
+ }
232
+ function minus(value1, value2) {
233
+ return bn_operation(value1, value2, Operations.MINUS);
234
+ }
235
+ function multiply(value1, value2) {
236
+ return bn_operation(value1, value2, Operations.MULTIPLY);
237
+ }
238
+ function toUsd(amount, price) {
239
+ return multiply(amount, price || 0);
240
+ }
241
+ ;
242
+ function divide(value1, value2) {
243
+ return bn_operation(value1, value2, Operations.DIVIDE);
244
+ }
245
+ function greaterThanOrEqual(value1, value2) {
246
+ return Boolean(bn_operation(value1, value2, Operations.GREATER_THAN_OR_EQUAL));
247
+ }
248
+ function greaterThan(value1, value2) {
249
+ return Boolean(bn_operation(value1, value2, Operations.GREATER_THAN));
250
+ }
251
+ function lessThanOrEqual(value1, value2) {
252
+ return Boolean(bn_operation(value1, value2, Operations.LESS_THAN_OR_EQUAL));
253
+ }
254
+ function lessThan(value1, value2) {
255
+ return Boolean(bn_operation(value1, value2, Operations.LESS_THAN));
256
+ }
257
+ function equal(value1, value2) {
258
+ return Boolean(bn_operation(value1, value2, Operations.EQUAL));
259
+ }
260
+ function mod(value1, value2) {
261
+ return bn_operation(value1, value2, Operations.MOD);
262
+ }
263
+ function modZero(value1, value2) {
264
+ return equal(mod(value1, value2), 0);
265
+ }
266
+ function bn_operation(a, b, operation) {
267
+ a = new bignumber_js_1.default(String(a));
268
+ b = new bignumber_js_1.default(String(b));
269
+ switch (operation.toLowerCase()) {
270
+ case '-':
271
+ return a.minus(b).toString();
272
+ case '+':
273
+ return a.plus(b).toString();
274
+ case '*':
275
+ case 'x':
276
+ return a.multipliedBy(b).toString();
277
+ case '÷':
278
+ case '/':
279
+ return a.dividedBy(b).toString();
280
+ case '>=':
281
+ return a.isGreaterThanOrEqualTo(b);
282
+ case '>':
283
+ return a.isGreaterThan(b);
284
+ case '<=':
285
+ return a.isLessThanOrEqualTo(b);
286
+ case '<':
287
+ return a.isLessThan(b);
288
+ case '==':
289
+ return a.isEqualTo(b);
290
+ case 'mod':
291
+ return a.modulo(b);
292
+ default:
293
+ break;
294
+ }
295
+ }
296
+ function getExponentialNumberComponents(x) {
297
+ if (x.toString().includes('e')) {
298
+ const parts = x.toString().split('e');
299
+ return [parseFloat(parts[0]), parseFloat(parts[1])];
300
+ }
301
+ return [x, 0];
302
+ }
303
+ function generateExponentialNumberFromComponents(decimalPart, exponent) {
304
+ return decimalPart + (exponent < 0 ? `e${exponent}` : `e+${exponent}`);
305
+ }
306
+ function roundNumber({ decimalPlaces = 0 }, x) {
307
+ if (decimalPlaces > 0) {
308
+ const [decimal, decimalExponentialPart] = getExponentialNumberComponents(x);
309
+ const [rounded, roundedExponentialPart] = getExponentialNumberComponents(Math.round(Number(generateExponentialNumberFromComponents(decimal, decimalExponentialPart + decimalPlaces))));
310
+ return Number(generateExponentialNumberFromComponents(rounded, roundedExponentialPart - decimalPlaces));
311
+ }
312
+ return Math.round(x);
313
+ }
314
+ function convertFromBaseUnits(assetDecimals, quantity) {
315
+ const decimals = Number(assetDecimals);
316
+ return roundNumber({ decimalPlaces: decimals },
317
+ // eslint-disable-next-line no-magic-numbers
318
+ Math.pow(10, -decimals) * Number(quantity));
319
+ }
320
+ /**
321
+ * Computs quantity * 10^(assetDecimals) and rounds the result
322
+ */
323
+ function convertToBaseUnits(assetDecimals, quantity) {
324
+ // eslint-disable-next-line no-magic-numbers
325
+ const baseAmount = Math.pow(10, Number(assetDecimals)) * Number(quantity);
326
+ // make sure the final value is an integer. This prevents this kind of computation errors: 0.0012 * 100000 = 119.99999999999999 and rounds this result into 120
327
+ return roundNumber({ decimalPlaces: 0 }, baseAmount);
328
+ }
329
+
330
+
331
+ /***/ }),
332
+
333
+ /***/ 2169:
334
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
335
+
336
+
337
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
338
+ exports.PointSystemSettingsIds = void 0;
339
+ const settings_type_1 = __webpack_require__(7159);
340
+ exports.PointSystemSettingsIds = [
341
+ settings_type_1.SettingIds.POINT_SYSTEM_DISCORD_ENABLED,
342
+ settings_type_1.SettingIds.POINT_SYSTEM_TELEGRAM_BOT_NAME,
343
+ settings_type_1.SettingIds.POINT_SYSTEM_TELEGRAM_BOT_ID,
344
+ settings_type_1.SettingIds.POINT_SYSTEM_TELEGRAM_ENABLED,
345
+ settings_type_1.SettingIds.POINT_SYSTEM_TELEGRAM_GROUP_ID,
346
+ settings_type_1.SettingIds.POINT_SYSTEM_TELEGRAM_GROUP_NAME,
347
+ settings_type_1.SettingIds.POINT_SYSTEM_TWITTER_ACCOUNT_ID,
348
+ settings_type_1.SettingIds.POINT_SYSTEM_TWITTER_ACCOUNT_NAME,
349
+ settings_type_1.SettingIds.POINT_SYSTEM_TWITTER_ENABLED,
350
+ settings_type_1.SettingIds.POINT_SYSTEM_TWITTER_JOB_ENABLED,
351
+ settings_type_1.SettingIds.POINT_SYSTEM_GUIDE_LINK,
352
+ ];
353
+
354
+
355
+ /***/ }),
356
+
357
+ /***/ 2806:
358
+ /***/ ((__unused_webpack_module, exports) => {
359
+
360
+
361
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
362
+ exports.EXPIRE_DAYS = exports.DAY_MILLISECONDS = void 0;
363
+ exports.DAY_MILLISECONDS = 86400000;
364
+ exports.EXPIRE_DAYS = 30;
365
+
366
+
367
+ /***/ }),
368
+
369
+ /***/ 3316:
370
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
371
+
372
+
373
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
374
+ exports.toDecimalPrice = exports.toDecimal = exports.defactorPrice = exports.factorPrice = void 0;
375
+ const big_number_helper_1 = __webpack_require__(1174);
376
+ const constants_1 = __webpack_require__(6450);
377
+ const factorPrice = (price) => {
378
+ return (0, big_number_helper_1.multiply)(price, 10 ** constants_1.FACTOR_PRICE_DECIMAL);
379
+ };
380
+ exports.factorPrice = factorPrice;
381
+ /**
382
+ * Convert a factored atomic value to a non-factored atomic value
383
+ * @param price - The price to convert
384
+ * @param decimal - The number of decimal places
385
+ * @returns The price converted to a non factored atomic value
386
+ */
387
+ const defactorPrice = (price, decimal) => {
388
+ return (0, big_number_helper_1.divide)(price, 10 ** (constants_1.FACTOR_PRICE_DECIMAL - decimal));
389
+ };
390
+ exports.defactorPrice = defactorPrice;
391
+ /**
392
+ * Convert an atomic value to a decimal value. ONLY for non-factored atomic values
393
+ * @param amount - The number to convert
394
+ * @param decimal - The number of decimal places
395
+ * @returns The number converted to a decimal
396
+ */
397
+ const toDecimal = (amount, decimal) => {
398
+ return (0, big_number_helper_1.divide)(amount, 10 ** decimal);
399
+ };
400
+ exports.toDecimal = toDecimal;
401
+ /**
402
+ * Convert a factored atomic value to a decimal value
403
+ * @param price - The price to convert
404
+ * @returns The price converted to a decimal
405
+ */
406
+ const toDecimalPrice = (price) => {
407
+ return (0, exports.toDecimal)(price, constants_1.FACTOR_PRICE_DECIMAL);
408
+ };
409
+ exports.toDecimalPrice = toDecimalPrice;
410
+
411
+
412
+ /***/ }),
413
+
414
+ /***/ 4574:
415
+ /***/ ((__unused_webpack_module, exports) => {
416
+
417
+
418
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
419
+ exports.messageForSigning = void 0;
420
+ const messageForSigning = (signingAddress) => `By signing this message, you confirm that the wallet is a trusted one ${signingAddress}; Data: `;
421
+ exports.messageForSigning = messageForSigning;
422
+
423
+
424
+ /***/ }),
425
+
426
+ /***/ 6168:
427
+ /***/ ((module) => {
428
+
429
+ module.exports = __WEBPACK_EXTERNAL_MODULE__6168__;
430
+
431
+ /***/ }),
432
+
433
+ /***/ 6450:
434
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
435
+
436
+
437
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
438
+ if (k2 === undefined) k2 = k;
439
+ var desc = Object.getOwnPropertyDescriptor(m, k);
440
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
441
+ desc = { enumerable: true, get: function() { return m[k]; } };
442
+ }
443
+ Object.defineProperty(o, k2, desc);
444
+ }) : (function(o, m, k, k2) {
445
+ if (k2 === undefined) k2 = k;
446
+ o[k2] = m[k];
447
+ }));
448
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
449
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
450
+ };
451
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
452
+ __exportStar(__webpack_require__(2806), exports);
453
+ __exportStar(__webpack_require__(661), exports);
454
+ __exportStar(__webpack_require__(9862), exports);
455
+ __exportStar(__webpack_require__(935), exports);
456
+ __exportStar(__webpack_require__(7801), exports);
457
+ __exportStar(__webpack_require__(2169), exports);
458
+ __exportStar(__webpack_require__(4574), exports);
459
+
460
+
461
+ /***/ }),
462
+
463
+ /***/ 7159:
464
+ /***/ ((__unused_webpack_module, exports) => {
465
+
466
+
467
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
468
+ exports.defaultThemesValue = exports.defaultThemeSettingValue = exports.defaultLogoSettingValue = exports.requiredColors = exports.settingIdToSecretType = exports.CredentialNameEnum = exports.AffDashboardVisibilitySettingEnum = exports.SettingIds = void 0;
469
+ var SettingIds;
470
+ (function (SettingIds) {
471
+ SettingIds["ENABLED"] = "company.enabled";
472
+ SettingIds["APP_TITLE"] = "company.appTitle";
473
+ SettingIds["DOMAIN"] = "company.domain";
474
+ SettingIds["LOGO"] = "appearance.logo";
475
+ SettingIds["AMM"] = "product.amm";
476
+ SettingIds["OBDEX"] = "product.obdex";
477
+ SettingIds["THEMES"] = "appearance.themes";
478
+ SettingIds["DIRECT_SETTLE"] = "company.directSettlement";
479
+ SettingIds["AMM_FEE"] = "company.ammFee";
480
+ SettingIds["FEE_SHARE"] = "company.feeShare";
481
+ SettingIds["MIN_FEE"] = "company.minFee";
482
+ SettingIds["MAKER_FEE"] = "company.makerFee";
483
+ SettingIds["TAKER_FEE"] = "company.takerFee";
484
+ SettingIds["GEOBLOCK"] = "company.geoblock";
485
+ SettingIds["EMBEDDED_APP_URL"] = "company.embeddedAppUrl";
486
+ SettingIds["PRODUCT_OBDEX"] = "product.obdex";
487
+ SettingIds["PRODUCT_AMM"] = "product.amm";
488
+ SettingIds["NEW_TAB"] = "appearance.newTab";
489
+ SettingIds["APPEARANCE_TARGET"] = "appearance.target";
490
+ SettingIds["CUSTOM_MENU_ITEMS"] = "appearance.customMenuItems";
491
+ SettingIds["REPORT_BUTTONS"] = "appearance.reportButtons";
492
+ SettingIds["APPEARANCE_CHART_TYPE"] = "appearance.chartType";
493
+ SettingIds["APPEARANCE_CHART_INT"] = "appearance.chartInt";
494
+ SettingIds["PINNED_PAIRS"] = "markets.pinnedPairs";
495
+ SettingIds["KYC_TRADE_REQUIREMENT_ENABLED"] = "markets.kycTradeRequirementEnabled";
496
+ SettingIds["AFFILIATE_DASHBOARD_VISIBILITY"] = "product.affiliateDashboardVisibility";
497
+ SettingIds["AFFILIATE_DASHBOARD_THRESHOLD"] = "product.affiliateDashboardThreshold";
498
+ SettingIds["AFFILIATE_DEFAULT_FEE_SHARE"] = "product.affiliateDefaultFeeShare";
499
+ SettingIds["AFFILIATE_POINTS_REWARD"] = "product.affiliatePointsReward";
500
+ SettingIds["POINT_SYSTEM_MODE"] = "product.pointSystem";
501
+ SettingIds["POINT_SYSTEM_TELEGRAM_API_TOKEN"] = "point-system.telegramApiToken";
502
+ SettingIds["POINT_SYSTEM_TELEGRAM_ENABLED"] = "point-system.telegramEnabled";
503
+ SettingIds["POINT_SYSTEM_TELEGRAM_GROUP_ID"] = "point-system.telegramGroupId";
504
+ SettingIds["POINT_SYSTEM_TELEGRAM_BOT_NAME"] = "point-system.telegramBotName";
505
+ SettingIds["POINT_SYSTEM_TELEGRAM_BOT_ID"] = "point-system.telegramBotId";
506
+ SettingIds["POINT_SYSTEM_TELEGRAM_GROUP_NAME"] = "point-system.telegramGroupName";
507
+ SettingIds["POINT_SYSTEM_TELEGRAM_WEBHOOK_TOKEN"] = "point-system.telegramWebhookToken";
508
+ SettingIds["POINT_SYSTEM_DISCORD_CLIENT_ID"] = "point-system.discordClientId";
509
+ SettingIds["POINT_SYSTEM_DISCORD_CLIENT_SECRET"] = "point-system.discordClientSecret";
510
+ SettingIds["POINT_SYSTEM_DISCORD_SERVER_ID"] = "point-system.discordServerId";
511
+ SettingIds["POINT_SYSTEM_DISCORD_ENABLED"] = "point-system.discordEnabled";
512
+ SettingIds["POINT_SYSTEM_TWITTER_CLIENT_ID"] = "point-system.twitterClientId";
513
+ SettingIds["POINT_SYSTEM_TWITTER_CLIENT_SECRET"] = "point-system.twitterClientSecret";
514
+ SettingIds["POINT_SYSTEM_TWITTER_BEARER_TOKEN"] = "point-system.twitterBearerToken";
515
+ SettingIds["POINT_SYSTEM_TWITTER_REFRESH_TOKEN"] = "point-system.twitterRefreshToken";
516
+ SettingIds["POINT_SYSTEM_TWITTER_ENABLED"] = "point-system.twitterEnabled";
517
+ SettingIds["POINT_SYSTEM_TWITTER_JOB_ENABLED"] = "point-system.twitterJobEnabled";
518
+ SettingIds["POINT_SYSTEM_TWITTER_HASHTAGS"] = "point-system.twitterHashtags";
519
+ SettingIds["POINT_SYSTEM_TWITTER_TWEET_EXP_TIME"] = "point-system.twitterPostDefaultExpirationTime";
520
+ SettingIds["POINT_SYSTEM_TWITTER_ACCOUNT_NAME"] = "point-system.twitterAccountName";
521
+ SettingIds["POINT_SYSTEM_TWITTER_ACCOUNT_ID"] = "point-system.twitterAccountId";
522
+ SettingIds["POINT_SYSTEM_TWITTER_WEBHOOK_TOKEN"] = "point-system.twitterWebhookToken";
523
+ SettingIds["POINT_SYSTEM_GUIDE_LINK"] = "point-system.guideLink";
524
+ })(SettingIds || (exports.SettingIds = SettingIds = {}));
525
+ var AffDashboardVisibilitySettingEnum;
526
+ (function (AffDashboardVisibilitySettingEnum) {
527
+ AffDashboardVisibilitySettingEnum["DISABLED"] = "disabled";
528
+ AffDashboardVisibilitySettingEnum["ENABLED_FOR_ALL"] = "enabled for all";
529
+ AffDashboardVisibilitySettingEnum["ENABLED_FOR_AFFILIATES"] = "enabled for affiliates";
530
+ })(AffDashboardVisibilitySettingEnum || (exports.AffDashboardVisibilitySettingEnum = AffDashboardVisibilitySettingEnum = {}));
531
+ var CredentialNameEnum;
532
+ (function (CredentialNameEnum) {
533
+ CredentialNameEnum["API_TOKEN"] = "apiToken";
534
+ CredentialNameEnum["CLIENT_ID"] = "clientId";
535
+ CredentialNameEnum["CLIENT_SECRET"] = "clientSecret";
536
+ CredentialNameEnum["BEARER_TOKEN"] = "bearerToken";
537
+ CredentialNameEnum["REFRESH_TOKEN"] = "refreshToken";
538
+ CredentialNameEnum["ACCESS_TOKEN"] = "accessToken";
539
+ })(CredentialNameEnum || (exports.CredentialNameEnum = CredentialNameEnum = {}));
540
+ exports.settingIdToSecretType = {
541
+ 'point-system.telegramApiToken': CredentialNameEnum.API_TOKEN,
542
+ 'point-system.discordClientId': CredentialNameEnum.CLIENT_ID,
543
+ 'point-system.discordClientSecret': CredentialNameEnum.CLIENT_SECRET,
544
+ 'point-system.twitterClientSecret': CredentialNameEnum.CLIENT_SECRET,
545
+ 'point-system.twitterClientId': CredentialNameEnum.CLIENT_ID,
546
+ 'point-system.twitterBearerToken': CredentialNameEnum.BEARER_TOKEN,
547
+ 'point-system.twitterRefreshToken': CredentialNameEnum.REFRESH_TOKEN,
548
+ };
549
+ exports.requiredColors = [
550
+ 'primary-1',
551
+ 'primary-2',
552
+ 'main-background',
553
+ 'primary-text',
554
+ 'module-background',
555
+ 'buy-text',
556
+ 'buy-background',
557
+ 'sell-text',
558
+ 'sell-background',
559
+ 'secondary-text',
560
+ 'input-background-default',
561
+ 'input-background-hover',
562
+ 'input-background-disabled',
563
+ 'input-border-default',
564
+ 'module-border',
565
+ 'button-disabled',
566
+ 'button-border',
567
+ 'input-border-active',
568
+ 'active-element-default',
569
+ 'hover-element-default',
570
+ 'dropdown-shadow',
571
+ 'button-text',
572
+ 'pair-active-row',
573
+ ];
574
+ exports.defaultLogoSettingValue = `{"theme1":{"value":"${process.env.FRONTEND_URL}/Theme%3DDark.svg","active":true},"theme2":{"value":"${process.env.FRONTEND_URL}/Theme%3DLight.svg","active":true},"theme3":{"value":"${process.env.FRONTEND_URL}/Theme%3DLight.svg","active":true}}`;
575
+ exports.defaultThemeSettingValue = '{"theme1":{"name":"dark","active":true,"value":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(1, 1, 1, 1)","primary-text":"rgba(255, 255, 255, 1)","module-background":"rgba(19, 23, 34, 1)","buy-text":"rgba(82, 164, 154, 1)","buy-background":"rgba(2, 199, 122, 0.25)","sell-text":"rgba(221, 94, 86, 1)","sell-background":"rgba(255, 59, 105, 0.25)","secondary-text":"rgba(127, 127, 127, 1)","input-background-default":"rgba(13, 15, 21, 1)","input-background-hover":"rgba(28, 33, 45, 1)","input-background-disabled":"rgba(25, 29, 41, 1)","input-border-default":"rgba(28, 33, 45, 1)","module-border":"rgba(28, 33, 45, 1)","button-disabled":"rgba(111, 113, 118, 1)","button-border":"rgba(255, 255, 255, 1)","input-border-active":"rgba(185, 163, 238, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgba(28, 33, 45, 1)"}},"theme2":{"name":"light","active":true,"value":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(249, 248, 248, 1)","primary-text":"rgba(0, 0, 0, 1)","module-background":"rgba(255, 255, 255, 1)","buy-text":"rgba(0, 112, 98, 1)","buy-background":"rgba(0, 112, 98, 0.25)","sell-text":"rgba(195, 12, 1, 1)","sell-background":"rgba(255, 59, 105, 0.25)","secondary-text":"rgba(127, 127, 127, 1)","button-disabled":"rgba(203, 199, 199, 1)","input-background-default":"rgba(255, 255, 255, 1)","input-background-hover":"rgba(249, 248, 248, 1)","input-background-disabled":"rgba(249, 248, 248, 1)","input-border-default":"rgba(228, 225, 225, 1)","module-border":"rgba(228, 225, 225, 1)","button-border":"rgba(170, 167, 167, 1)","input-border-active":"rgba(0, 0, 0, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgb(249, 248, 248)"}},"theme3":{"name":"purple","active":true,"value":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(255, 255, 255, 1)","primary-text":"rgba(0, 0, 0, 1)","secondary-text":"rgba(127, 127, 127, 1)","buy-text":"rgba(0, 112, 98, 1)","sell-text":"rgba(195, 12, 1, 1)","buy-background":"rgba(0, 112, 98, 0.25)","sell-background":"rgba(255, 59, 105, 0.25)","module-background":"rgba(254, 250, 255, 1)","module-border":"rgba(228, 225, 225, 1)","input-background-default":"rgba(255, 255, 255, 1)","input-background-hover":"rgba(249, 248, 248, 1)","input-background-disabled":"rgba(254, 250, 255, 1)","input-border-default":"rgba(228, 225, 225, 1)","input-border-active":"rgba(0, 0, 0, 1)","button-border":"rgba(170, 167, 167, 1)","button-disabled":"rgba(203, 199, 199, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgb(249, 248, 248)"}}}';
576
+ var defaultThemesValue;
577
+ (function (defaultThemesValue) {
578
+ defaultThemesValue["theme1"] = "{\"name\":\"dark\",\"id\":\"theme1\",\"active\":true, \"chartColors\":{\"bullish_candle_color\": \"rgba(2, 199, 122, 0.25)\",\"bearish_candle_color\": \"rgba(221, 94, 86, 1)\",\"bullish_wick_color\": \"rgba(2, 199, 122, 0.25)\",\"bearish_wick_color\": \"rgba(221, 94, 86, 1)\",\"bullish_outline_color\": \"rgba(2, 199, 122, 0.25)\",\"bearish_outline_color\": \"rgba(221, 94, 86, 1)\",\"line_color\": \"rgba(41, 98, 255, 1)\",\"chart_background\": \"rgba(19, 23, 34, 1)\",\"chart_text\": \"rgba(127, 127, 127, 1)\"}, \"colors\":{\"primary-1\":\"rgba(118, 63, 229, 1)\",\"primary-2\":\"rgba(249, 132, 146, 1)\",\"main-background\":\"rgba(1, 1, 1, 1)\",\"primary-text\":\"rgba(255, 255, 255, 1)\",\"module-background\":\"rgba(19, 23, 34, 1)\",\"buy-text\":\"rgba(82, 164, 154, 1)\",\"buy-background\":\"rgba(2, 199, 122, 0.25)\",\"sell-text\":\"rgba(221, 94, 86, 1)\",\"sell-background\":\"rgba(255, 59, 105, 0.25)\",\"secondary-text\":\"rgba(127, 127, 127, 1)\",\"input-background-default\":\"rgba(13, 15, 21, 1)\",\"input-background-hover\":\"rgba(28, 33, 45, 1)\",\"input-background-disabled\":\"rgba(25, 29, 41, 1)\",\"input-border-default\":\"rgba(28, 33, 45, 1)\",\"module-border\":\"rgba(28, 33, 45, 1)\",\"button-disabled\":\"rgba(111, 113, 118, 1)\",\"button-border\":\"rgba(255, 255, 255, 1)\",\"input-border-active\":\"rgba(185, 163, 238, 1)\",\"active-element-default\":\"rgba(230, 136, 150, 1)\",\"hover-element-default\":\"rgba(185, 163, 238, 1)\",\"dropdown-shadow\":\"rgba(154, 92, 253, 0.45)\",\"button-text\":\"rgba(255, 255, 255, 1)\",\"pair-active-row\":\"rgba(28, 33, 45, 1)\"}}";
579
+ defaultThemesValue["theme2"] = "{\"name\":\"light\",\"id\":\"theme2\",\"active\":true, \"chartColors\":{\"bullish_candle_color\": \"rgba(0, 112, 98, 1)\",\"bearish_candle_color\": \"rgba(195, 12, 1, 1)\",\"bullish_wick_color\": \"rgba(0, 112, 98, 1)\",\"bearish_wick_color\": \"rgba(195, 12, 1, 1)\",\"bullish_outline_color\": \"rgba(0, 112, 98, 1)\",\"bearish_outline_color\": \"rgba(195, 12, 1, 1)\",\"line_color\": \"rgba(41, 98, 255, 1)\",\"chart_background\": \"rgba(255, 255, 255, 1)\",\"chart_text\": \"rgba(127, 127, 127, 1)\"}, \"colors\":{\"primary-1\":\"rgba(118, 63, 229, 1)\",\"primary-2\":\"rgba(249, 132, 146, 1)\",\"main-background\":\"rgba(249, 248, 248, 1)\",\"primary-text\":\"rgba(0, 0, 0, 1)\",\"module-background\":\"rgba(255, 255, 255, 1)\",\"buy-text\":\"rgba(0, 112, 98, 1)\",\"buy-background\":\"rgba(0, 112, 98, 0.25)\",\"sell-text\":\"rgba(195, 12, 1, 1)\",\"sell-background\":\"rgba(255, 59, 105, 0.25)\",\"secondary-text\":\"rgba(127, 127, 127, 1)\",\"button-disabled\":\"rgba(203, 199, 199, 1)\",\"input-background-default\":\"rgba(255, 255, 255, 1)\",\"input-background-hover\":\"rgba(249, 248, 248, 1)\",\"input-background-disabled\":\"rgba(249, 248, 248, 1)\",\"input-border-default\":\"rgba(228, 225, 225, 1)\",\"module-border\":\"rgba(228, 225, 225, 1)\",\"button-border\":\"rgba(170, 167, 167, 1)\",\"input-border-active\":\"rgba(0, 0, 0, 1)\",\"active-element-default\":\"rgba(230, 136, 150, 1)\",\"hover-element-default\":\"rgba(185, 163, 238, 1)\",\"dropdown-shadow\":\"rgba(154, 92, 253, 0.45)\",\"button-text\":\"rgba(255, 255, 255, 1)\",\"pair-active-row\":\"rgb(249, 248, 248)\"}}";
580
+ defaultThemesValue["theme3"] = "{\"name\":\"purple\",\"id\":\"theme3\",\"active\":true, \"chartColors\":{\"bullish_candle_color\": \"rgba(0, 112, 98, 1)\",\"bearish_candle_color\": \"rgba(195, 12, 1, 1)\",\"bullish_wick_color\": \"rgba(0, 112, 98, 1)\",\"bearish_wick_color\": \"rgba(195, 12, 1, 1)\",\"bullish_outline_color\": \"rgba(0, 112, 98, 1)\",\"bearish_outline_color\": \"rgba(195, 12, 1, 1)\",\"line_color\": \"rgba(41, 98, 255, 1)\",\"chart_background\": \"rgba(254, 250, 255, 1)\",\"chart_text\": \"rgba(127, 127, 127, 1)\"}, \"colors\":{\"primary-1\":\"rgba(118, 63, 229, 1)\",\"primary-2\":\"rgba(249, 132, 146, 1)\",\"main-background\":\"rgba(255, 255, 255, 1)\",\"primary-text\":\"rgba(0, 0, 0, 1)\",\"secondary-text\":\"rgba(127, 127, 127, 1)\",\"buy-text\":\"rgba(0, 112, 98, 1)\",\"sell-text\":\"rgba(195, 12, 1, 1)\",\"buy-background\":\"rgba(0, 112, 98, 0.25)\",\"sell-background\":\"rgba(255, 59, 105, 0.25)\",\"module-background\":\"rgba(254, 250, 255, 1)\",\"module-border\":\"rgba(228, 225, 225, 1)\",\"input-background-default\":\"rgba(255, 255, 255, 1)\",\"input-background-hover\":\"rgba(249, 248, 248, 1)\",\"input-background-disabled\":\"rgba(254, 250, 255, 1)\",\"input-border-default\":\"rgba(228, 225, 225, 1)\",\"input-border-active\":\"rgba(0, 0, 0, 1)\",\"button-border\":\"rgba(170, 167, 167, 1)\",\"button-disabled\":\"rgba(203, 199, 199, 1)\",\"active-element-default\":\"rgba(230, 136, 150, 1)\",\"hover-element-default\":\"rgba(185, 163, 238, 1)\",\"dropdown-shadow\":\"rgba(154, 92, 253, 0.45)\",\"button-text\":\"rgba(255, 255, 255, 1)\",\"pair-active-row\":\"rgb(249, 248, 248)\"}}";
581
+ })(defaultThemesValue || (exports.defaultThemesValue = defaultThemesValue = {}));
582
+
583
+
584
+ /***/ }),
585
+
586
+ /***/ 7801:
587
+ /***/ ((__unused_webpack_module, exports) => {
588
+
589
+
590
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
591
+ exports.QueueOptions = exports.QueueNames = void 0;
592
+ var QueueNames;
593
+ (function (QueueNames) {
594
+ QueueNames["CANCELLATION_TRADE"] = "cancellation_trade";
595
+ QueueNames["CANCEL_ORDER"] = "cancelOrder";
596
+ QueueNames["MAINTENANCE"] = "maintenance";
597
+ QueueNames["SYSTEM"] = "system";
598
+ QueueNames["NEW_ORDER"] = "newOrder";
599
+ QueueNames["PROCESS_WALLET_TRANSACTION"] = "wallet_transaction";
600
+ QueueNames["LAST_LOOK_TRADE"] = "last_look_trade";
601
+ QueueNames["SEND_TRADE_TO_SETTLE"] = "send_trade_to_settle";
602
+ QueueNames["TRADE_FIRE"] = "trade_fire";
603
+ QueueNames["TRADE_CONFIRMED"] = "trade_confirmed";
604
+ QueueNames["ORDER_OPERATION"] = "order_operation";
605
+ QueueNames["ORDER_RESULT"] = "order_result";
606
+ QueueNames["TRADES_QUEUE"] = "trades_q";
607
+ QueueNames["OPEN_ORDER_BOOK"] = "open_order_book";
608
+ QueueNames["SOCKET_WALLET_TRANSACTION"] = "socket_wallet_transaction";
609
+ QueueNames["STREAM_UPDATE_QUOTE"] = "stream_update_quote";
610
+ QueueNames["STREAM_UPDATE_LAST_PRICE"] = "stream_update_last_price";
611
+ QueueNames["STREAM_UPDATE_DEPTH"] = "stream_update_depth";
612
+ QueueNames["STREAM_UPDATE_LAST_CANDLESTICK"] = "stream_update_last_candlestick";
613
+ QueueNames["STREAM_UPDATE_ORDERS"] = "stream_update_orders";
614
+ QueueNames["STREAM_UPDATE_TRADES"] = "stream_update_trades";
615
+ QueueNames["STREAM_UPDATE_ORDER_BOOK"] = "stream_update_order_book";
616
+ QueueNames["CODEX_DEPOSIT"] = "codex_deposit";
617
+ QueueNames["CODEX_TRANSFER"] = "codex_transfer";
618
+ QueueNames["CODEX_WITHDRAWAL"] = "codex_withdrawal";
619
+ QueueNames["CODEX_BALANCES"] = "codex_balances";
620
+ QueueNames["CODEX_TRADE"] = "codex_trade";
621
+ QueueNames["VAA_LOG"] = "vaa_log";
622
+ QueueNames["SETTINGS_UPDATE"] = "settings_update";
623
+ QueueNames["POINT_SYSTEM_SETTINGS_UPDATE"] = "point_system_settings_update";
624
+ QueueNames["NEW_NOTIFICATION"] = "new_notification";
625
+ })(QueueNames || (exports.QueueNames = QueueNames = {}));
626
+ exports.QueueOptions = {
627
+ [QueueNames.CANCELLATION_TRADE]: { options: { durable: true } },
628
+ [QueueNames.CANCEL_ORDER]: { options: { durable: true } },
629
+ [QueueNames.CODEX_BALANCES]: { options: { durable: true } },
630
+ [QueueNames.CODEX_DEPOSIT]: { options: { durable: true } },
631
+ [QueueNames.CODEX_TRANSFER]: { options: { durable: true } },
632
+ [QueueNames.CODEX_TRADE]: { options: { durable: true } },
633
+ [QueueNames.CODEX_WITHDRAWAL]: { options: { durable: true } },
634
+ [QueueNames.LAST_LOOK_TRADE]: { options: { durable: true } },
635
+ [QueueNames.MAINTENANCE]: { options: { durable: true } },
636
+ [QueueNames.SYSTEM]: { options: { durable: true } },
637
+ [QueueNames.NEW_ORDER]: { options: { durable: true } },
638
+ [QueueNames.OPEN_ORDER_BOOK]: { options: { durable: true } },
639
+ [QueueNames.ORDER_OPERATION]: { options: { durable: true, maxPriority: 5 } },
640
+ [QueueNames.ORDER_RESULT]: { options: { durable: true } },
641
+ [QueueNames.PROCESS_WALLET_TRANSACTION]: { options: { durable: true } },
642
+ [QueueNames.SEND_TRADE_TO_SETTLE]: { options: { durable: true } },
643
+ [QueueNames.SOCKET_WALLET_TRANSACTION]: { options: { durable: true } },
644
+ [QueueNames.STREAM_UPDATE_DEPTH]: { options: { durable: true } },
645
+ [QueueNames.STREAM_UPDATE_LAST_CANDLESTICK]: { options: { durable: true } },
646
+ [QueueNames.STREAM_UPDATE_LAST_PRICE]: { options: { durable: true } },
647
+ [QueueNames.STREAM_UPDATE_ORDERS]: { options: { durable: true } },
648
+ [QueueNames.STREAM_UPDATE_ORDER_BOOK]: { options: { durable: true } },
649
+ [QueueNames.STREAM_UPDATE_QUOTE]: { options: { durable: true } },
650
+ [QueueNames.STREAM_UPDATE_TRADES]: { options: { durable: true } },
651
+ [QueueNames.TRADES_QUEUE]: { options: { durable: true } },
652
+ [QueueNames.TRADE_CONFIRMED]: { options: { durable: true } },
653
+ [QueueNames.TRADE_FIRE]: { options: { durable: true } },
654
+ [QueueNames.VAA_LOG]: { options: { durable: true } },
655
+ [QueueNames.SETTINGS_UPDATE]: { options: { durable: true } },
656
+ [QueueNames.POINT_SYSTEM_SETTINGS_UPDATE]: { options: { durable: true } },
657
+ [QueueNames.NEW_NOTIFICATION]: { options: { durable: true } },
658
+ };
659
+
660
+
661
+ /***/ }),
662
+
663
+ /***/ 9862:
664
+ /***/ ((__unused_webpack_module, exports) => {
665
+
666
+
667
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
668
+ exports.CCTP_UNIFIED_ASSETS = void 0;
669
+ exports.CCTP_UNIFIED_ASSETS = {
670
+ "0x4343545055534443000000000000000000000000000000000000000000000000": 65537,
671
+ };
672
+
673
+
674
+ /***/ })
675
+
676
+ /******/ });
677
+ /************************************************************************/
678
+ /******/ // The module cache
679
+ /******/ var __webpack_module_cache__ = {};
680
+ /******/
681
+ /******/ // The require function
682
+ /******/ function __webpack_require__(moduleId) {
683
+ /******/ // Check if module is in cache
684
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
685
+ /******/ if (cachedModule !== undefined) {
686
+ /******/ return cachedModule.exports;
687
+ /******/ }
688
+ /******/ // Create a new module (and put it into the cache)
689
+ /******/ var module = __webpack_module_cache__[moduleId] = {
690
+ /******/ // no module.id needed
691
+ /******/ // no module.loaded needed
692
+ /******/ exports: {}
693
+ /******/ };
694
+ /******/
695
+ /******/ // Execute the module function
696
+ /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
697
+ /******/
698
+ /******/ // Return the exports of the module
699
+ /******/ return module.exports;
700
+ /******/ }
701
+ /******/
702
+ /************************************************************************/
703
+ /******/
704
+ /******/ // startup
705
+ /******/ // Load entry module and return exports
706
+ /******/ // This entry module is referenced by other modules so it can't be inlined
707
+ /******/ var __webpack_exports__ = __webpack_require__(3316);
708
+ /******/
709
+ /******/ return __webpack_exports__;
710
+ /******/ })()
711
+ ;
712
+ });