@reyaxyz/common 0.43.0 → 0.45.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 (34) hide show
  1. package/dist/decorators/index.js +18 -0
  2. package/dist/decorators/index.js.map +1 -0
  3. package/dist/decorators/logger.js +20 -0
  4. package/dist/decorators/logger.js.map +1 -0
  5. package/dist/index.js +1 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/rest/helpers/constants.js +3 -0
  8. package/dist/rest/helpers/constants.js.map +1 -1
  9. package/dist/services/getSocketAddresses.js +0 -3
  10. package/dist/services/getSocketAddresses.js.map +1 -1
  11. package/dist/services/getSocketWithdrawFees.js +0 -3
  12. package/dist/services/getSocketWithdrawFees.js.map +1 -1
  13. package/dist/types/decorators/index.d.ts +2 -0
  14. package/dist/types/decorators/index.d.ts.map +1 -0
  15. package/dist/types/decorators/logger.d.ts +5 -0
  16. package/dist/types/decorators/logger.d.ts.map +1 -0
  17. package/dist/types/index.d.ts +1 -0
  18. package/dist/types/index.d.ts.map +1 -1
  19. package/dist/types/rest/helpers/constants.d.ts +1 -0
  20. package/dist/types/rest/helpers/constants.d.ts.map +1 -1
  21. package/dist/types/services/getSocketAddresses.d.ts.map +1 -1
  22. package/dist/types/services/getSocketWithdrawFees.d.ts.map +1 -1
  23. package/dist/types/types.d.ts +0 -1
  24. package/dist/types/types.d.ts.map +1 -1
  25. package/dist/types.js +0 -2
  26. package/dist/types.js.map +1 -1
  27. package/package.json +2 -2
  28. package/src/decorators/index.ts +1 -0
  29. package/src/decorators/logger.ts +20 -0
  30. package/src/index.ts +1 -0
  31. package/src/rest/helpers/constants.ts +4 -0
  32. package/src/services/getSocketAddresses.ts +0 -3
  33. package/src/services/getSocketWithdrawFees.ts +0 -3
  34. package/src/types.ts +0 -2
@@ -0,0 +1,18 @@
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("./logger"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["decorators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB","sourcesContent":["export * from './logger';\n"]}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Logger = void 0;
4
+ function Logger(logPrefix) {
5
+ return function (target, propertyKey, descriptor) {
6
+ var originalMethod = descriptor.value;
7
+ descriptor.value = function () {
8
+ var args = [];
9
+ for (var _i = 0; _i < arguments.length; _i++) {
10
+ args[_i] = arguments[_i];
11
+ }
12
+ if (this.loggingEnabled) {
13
+ console.log("[".concat(logPrefix, "]: called with args: "), args);
14
+ }
15
+ return originalMethod.apply(this, args);
16
+ };
17
+ };
18
+ }
19
+ exports.Logger = Logger;
20
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"/","sources":["decorators/logger.ts"],"names":[],"mappings":";;;AAIA,SAAgB,MAAM,CAAC,SAAiB;IACtC,OAAO,UACL,MAAc,EACd,WAA4B,EAC5B,UAA8B;QAE9B,IAAM,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;QAExC,UAAU,CAAC,KAAK,GAAG;YAAU,cAAgB;iBAAhB,UAAgB,EAAhB,qBAAgB,EAAhB,IAAgB;gBAAhB,yBAAgB;;YAC3C,IAAK,IAAiB,CAAC,cAAc,EAAE,CAAC;gBACtC,OAAO,CAAC,GAAG,CAAC,WAAI,SAAS,0BAAuB,EAAE,IAAI,CAAC,CAAC;YAC1D,CAAC;YACD,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC1C,CAAC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAfD,wBAeC","sourcesContent":["export interface Loggable {\n loggingEnabled: boolean;\n}\n\nexport function Logger(logPrefix: string) {\n return function (\n target: object,\n propertyKey: string | symbol,\n descriptor: PropertyDescriptor,\n ) {\n const originalMethod = descriptor.value;\n\n descriptor.value = function (...args: never[]) {\n if ((this as Loggable).loggingEnabled) {\n console.log(`[${logPrefix}]: called with args: `, args);\n }\n return originalMethod.apply(this, args);\n };\n };\n}\n"]}
package/dist/index.js CHANGED
@@ -20,4 +20,5 @@ __exportStar(require("./utils"), exports);
20
20
  __exportStar(require("./services"), exports);
21
21
  __exportStar(require("./modules"), exports);
22
22
  __exportStar(require("./rest"), exports);
23
+ __exportStar(require("./decorators"), exports);
23
24
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,0CAAwB;AACxB,6CAA2B;AAC3B,4CAA0B;AAC1B,yCAAuB","sourcesContent":["export * from './types';\nexport * from './commands';\nexport * from './utils';\nexport * from './services';\nexport * from './modules';\nexport * from './rest';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,0CAAwB;AACxB,6CAA2B;AAC3B,4CAA0B;AAC1B,yCAAuB;AACvB,+CAA6B","sourcesContent":["export * from './types';\nexport * from './commands';\nexport * from './utils';\nexport * from './services';\nexport * from './modules';\nexport * from './rest';\nexport * from './decorators';\n"]}
@@ -14,6 +14,7 @@ exports.API_CLIENT_CONFIGS = {
14
14
  clientId: 'LTBKa25VWkpjaEtSMzRGVEZaYmU6MTpjaQ',
15
15
  redirectURI: 'https://m8mjgmqmte.eu-central-1.awsapprunner.com/api/twitter/share',
16
16
  },
17
+ logging: true,
17
18
  },
18
19
  production: {
19
20
  chain: types_1.ReyaChainId.reyaNetwork,
@@ -24,6 +25,7 @@ exports.API_CLIENT_CONFIGS = {
24
25
  clientId: 'LTBKa25VWkpjaEtSMzRGVEZaYmU6MTpjaQ',
25
26
  redirectURI: 'https://mtducb79rf.eu-central-1.awsapprunner.com/api/twitter/share',
26
27
  },
28
+ logging: false,
27
29
  },
28
30
  test: {
29
31
  chain: types_1.ReyaChainId.reyaCronos,
@@ -34,6 +36,7 @@ exports.API_CLIENT_CONFIGS = {
34
36
  clientId: 'LTBKa25VWkpjaEtSMzRGVEZaYmU6MTpjaQ',
35
37
  redirectURI: 'https://m8mjgmqmte.eu-central-1.awsapprunner.com/api/twitter/share',
36
38
  },
39
+ logging: true,
37
40
  },
38
41
  };
39
42
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"/","sources":["rest/helpers/constants.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,qCAA0C;AAc7B,QAAA,kBAAkB,GAA8C;IAC3E,KAAK,EAAE;QACL,KAAK,EAAE,mBAAW,CAAC,UAAU;QAC7B,WAAW,EAAE,uBAAuB;QACpC,WAAW,EAAE,OAAO;QACpB,OAAO,EAAE,mBAAW;QACpB,2DAA2D;QAC3D,OAAO,EAAE;YACP,QAAQ,EAAE,oCAAoC;YAC9C,WAAW,EACT,oEAAoE;SACvE;KACF;IACD,UAAU,EAAE;QACV,KAAK,EAAE,mBAAW,CAAC,WAAW;QAC9B,WAAW,EAAE,sBAAsB;QACnC,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,mBAAW;QACpB,OAAO,EAAE;YACP,QAAQ,EAAE,oCAAoC;YAC9C,WAAW,EACT,oEAAoE;SACvE;KACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,mBAAW,CAAC,UAAU;QAC7B,WAAW,EAAE,kDAAkD;QAC/D,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,mBAAW;QACpB,OAAO,EAAE;YACP,QAAQ,EAAE,oCAAoC;YAC9C,WAAW,EACT,oEAAoE;SACvE;KACF;CACF,CAAC","sourcesContent":["import { API_TIMEOUT } from '../../utils';\nimport { ReyaChainId } from '../../types';\n\ntype ServiceEnvironment = 'production' | 'test' | 'local';\nexport interface ServiceConfig {\n chain: ReyaChainId;\n apiEndpoint: string;\n environment: ServiceEnvironment; // Configuration for SDK, such as base URL for the REST API\n timeout: number; // Optional timeout for API requests\n twitter: {\n clientId: string;\n redirectURI: string;\n };\n}\n\nexport const API_CLIENT_CONFIGS: Record<ServiceEnvironment, ServiceConfig> = {\n local: {\n chain: ReyaChainId.reyaCronos,\n apiEndpoint: 'http://localhost:3000',\n environment: 'local',\n timeout: API_TIMEOUT,\n // todo: change to production creds when new app is created\n twitter: {\n clientId: 'LTBKa25VWkpjaEtSMzRGVEZaYmU6MTpjaQ',\n redirectURI:\n 'https://m8mjgmqmte.eu-central-1.awsapprunner.com/api/twitter/share',\n },\n },\n production: {\n chain: ReyaChainId.reyaNetwork,\n apiEndpoint: 'https://api.reya.xyz',\n environment: 'production',\n timeout: API_TIMEOUT,\n twitter: {\n clientId: 'LTBKa25VWkpjaEtSMzRGVEZaYmU6MTpjaQ',\n redirectURI:\n 'https://mtducb79rf.eu-central-1.awsapprunner.com/api/twitter/share',\n },\n },\n test: {\n chain: ReyaChainId.reyaCronos,\n apiEndpoint: 'https://m8mjgmqmte.eu-central-1.awsapprunner.com',\n environment: 'test',\n timeout: API_TIMEOUT,\n twitter: {\n clientId: 'LTBKa25VWkpjaEtSMzRGVEZaYmU6MTpjaQ',\n redirectURI:\n 'https://m8mjgmqmte.eu-central-1.awsapprunner.com/api/twitter/share',\n },\n },\n};\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"/","sources":["rest/helpers/constants.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,qCAA0C;AAe7B,QAAA,kBAAkB,GAA8C;IAC3E,KAAK,EAAE;QACL,KAAK,EAAE,mBAAW,CAAC,UAAU;QAC7B,WAAW,EAAE,uBAAuB;QACpC,WAAW,EAAE,OAAO;QACpB,OAAO,EAAE,mBAAW;QACpB,2DAA2D;QAC3D,OAAO,EAAE;YACP,QAAQ,EAAE,oCAAoC;YAC9C,WAAW,EACT,oEAAoE;SACvE;QACD,OAAO,EAAE,IAAI;KACd;IACD,UAAU,EAAE;QACV,KAAK,EAAE,mBAAW,CAAC,WAAW;QAC9B,WAAW,EAAE,sBAAsB;QACnC,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,mBAAW;QACpB,OAAO,EAAE;YACP,QAAQ,EAAE,oCAAoC;YAC9C,WAAW,EACT,oEAAoE;SACvE;QACD,OAAO,EAAE,KAAK;KACf;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,mBAAW,CAAC,UAAU;QAC7B,WAAW,EAAE,kDAAkD;QAC/D,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,mBAAW;QACpB,OAAO,EAAE;YACP,QAAQ,EAAE,oCAAoC;YAC9C,WAAW,EACT,oEAAoE;SACvE;QACD,OAAO,EAAE,IAAI;KACd;CACF,CAAC","sourcesContent":["import { API_TIMEOUT } from '../../utils';\nimport { ReyaChainId } from '../../types';\n\ntype ServiceEnvironment = 'production' | 'test' | 'local';\nexport interface ServiceConfig {\n chain: ReyaChainId;\n apiEndpoint: string;\n environment: ServiceEnvironment; // Configuration for SDK, such as base URL for the REST API\n timeout: number; // Optional timeout for API requests\n twitter: {\n clientId: string;\n redirectURI: string;\n };\n logging: boolean;\n}\n\nexport const API_CLIENT_CONFIGS: Record<ServiceEnvironment, ServiceConfig> = {\n local: {\n chain: ReyaChainId.reyaCronos,\n apiEndpoint: 'http://localhost:3000',\n environment: 'local',\n timeout: API_TIMEOUT,\n // todo: change to production creds when new app is created\n twitter: {\n clientId: 'LTBKa25VWkpjaEtSMzRGVEZaYmU6MTpjaQ',\n redirectURI:\n 'https://m8mjgmqmte.eu-central-1.awsapprunner.com/api/twitter/share',\n },\n logging: true,\n },\n production: {\n chain: ReyaChainId.reyaNetwork,\n apiEndpoint: 'https://api.reya.xyz',\n environment: 'production',\n timeout: API_TIMEOUT,\n twitter: {\n clientId: 'LTBKa25VWkpjaEtSMzRGVEZaYmU6MTpjaQ',\n redirectURI:\n 'https://mtducb79rf.eu-central-1.awsapprunner.com/api/twitter/share',\n },\n logging: false,\n },\n test: {\n chain: ReyaChainId.reyaCronos,\n apiEndpoint: 'https://m8mjgmqmte.eu-central-1.awsapprunner.com',\n environment: 'test',\n timeout: API_TIMEOUT,\n twitter: {\n clientId: 'LTBKa25VWkpjaEtSMzRGVEZaYmU6MTpjaQ',\n redirectURI:\n 'https://m8mjgmqmte.eu-central-1.awsapprunner.com/api/twitter/share',\n },\n logging: true,\n },\n};\n"]}
@@ -34,9 +34,6 @@ var getSocketConnectors = function (params) {
34
34
  };
35
35
  exports.getSocketConnectors = getSocketConnectors;
36
36
  var socketControllers = (_b = {},
37
- _b[types_1.ReyaChainId.polygonMumbai] = {
38
- USDC: '',
39
- },
40
37
  _b[types_1.ReyaChainId.reyaCronos] = {
41
38
  USDC: '0xc5a5Ac67fff82Da72d1F862f1363E2b217a2A61A'.toLowerCase(),
42
39
  },
@@ -1 +1 @@
1
- {"version":3,"file":"getSocketAddresses.js","sourceRoot":"/","sources":["services/getSocketAddresses.ts"],"names":[],"mappings":";;;;AAAA,kCAQkB;AAElB,IAAM,gBAAgB;IAIpB,GAAC,yBAAiB,CAAC,aAAa,IAAG;QACjC,IAAI,EAAE;YAC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QACjC,IAAI,EAAE,4CAA4C,CAAC,WAAW,EAAa;KAC5E;IACD,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,IAAI,EAAE,4CAA4C,CAAC,WAAW,EAAa;KAC5E;IACD,GAAC,yBAAiB,CAAC,SAAS,IAAG;QAC7B,IAAI,EAAE,4CAA4C,CAAC,WAAW,EAAa;KAC5E;IACD,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,IAAI,EAAE,4CAA4C,CAAC,WAAW,EAAa;KAC5E;OACF,CAAC;AAEK,IAAM,cAAc,GAAG,UAAC,MAA4B;IACzD,OAAO,YAAY,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAClE,CAAC,CAAC;AAFW,QAAA,cAAc,kBAEzB","sourcesContent":["import {\n ReyaChainId,\n GetSocketConnectorParams,\n Address,\n GetSocketControllerParams,\n MoneyInOutChainId,\n GetSocketVaultParams,\n SocketTokenConnectors,\n} from '../types';\n\nconst socketConnectors: Record<\n MoneyInOutChainId,\n Record<Uppercase<string>, SocketTokenConnectors>\n> = {\n [MoneyInOutChainId.polygonMumbai]: {\n USDC: {\n deposit:\n '0xF5b588306867992201fc78dE045bCe01BE6eA2fD'.toLowerCase() as Address,\n withdraw:\n '0x47E136cf4A96e1afa72e19022f9699Bbaa1BE60e'.toLowerCase() as Address,\n },\n },\n [MoneyInOutChainId.arbitrumSepolia]: {\n USDC: {\n deposit:\n '0xeD4F75f0C25963d2C61827261C2d7f84BF884c7F'.toLowerCase() as Address,\n withdraw:\n '0xCd2E3CCb0Eeec6F2762dcD5D24a76583b69f3Ee1'.toLowerCase() as Address,\n },\n },\n [MoneyInOutChainId.opSepolia]: {\n USDC: {\n deposit:\n '0x9838Fc33ea56F7664c677b1F2917c60d75a73BC6'.toLowerCase() as Address,\n withdraw:\n '0x9ca48cAF8AD2B081a0b633d6FCD803076F719fEa'.toLowerCase() as Address,\n },\n },\n [MoneyInOutChainId.ethereumSepolia]: {\n USDC: {\n deposit:\n '0x4BFDf43662cdf2Cc0A96C8697AC179819B6E5E91'.toLowerCase() as Address,\n withdraw:\n '0x1d43076909Ca139BFaC4EbB7194518bE3638fc76'.toLowerCase() as Address,\n },\n },\n};\n\nexport const getSocketConnectors = (\n params: GetSocketConnectorParams,\n): SocketTokenConnectors => {\n return socketConnectors[params.moneyInOutChainId][params.tokenName];\n};\n\nconst socketControllers: Record<\n ReyaChainId,\n Record<Uppercase<string>, Address>\n> = {\n [ReyaChainId.polygonMumbai]: {\n USDC: '',\n },\n [ReyaChainId.reyaCronos]: {\n USDC: '0xc5a5Ac67fff82Da72d1F862f1363E2b217a2A61A'.toLowerCase() as Address,\n },\n [ReyaChainId.reyaNetwork]: {\n USDC: '',\n },\n};\n\nexport const getSocketController = (\n params: GetSocketControllerParams,\n): Address => {\n return socketControllers[params.reyaChainId][params.tokenName];\n};\n\nconst socketVaults: Record<\n MoneyInOutChainId,\n Record<Uppercase<string>, Address>\n> = {\n [MoneyInOutChainId.polygonMumbai]: {\n USDC: '0xEC5b7075F581D46983EBe2Be6baB0f58Bf1E8C4b'.toLowerCase() as Address,\n },\n [MoneyInOutChainId.arbitrumSepolia]: {\n USDC: '0x85314b664cB2e443C93F09EDb51088f76b048212'.toLowerCase() as Address,\n },\n [MoneyInOutChainId.opSepolia]: {\n USDC: '0x1019958C2BD43B882a4e1349337a32Ef9563FC4D'.toLowerCase() as Address,\n },\n [MoneyInOutChainId.ethereumSepolia]: {\n USDC: '0x8487daa5864a5cE18E5a89406c11EC748da33fbB'.toLowerCase() as Address,\n },\n};\n\nexport const getSocketVault = (params: GetSocketVaultParams): Address => {\n return socketVaults[params.moneyInOutChainId][params.tokenName];\n};\n"]}
1
+ {"version":3,"file":"getSocketAddresses.js","sourceRoot":"/","sources":["services/getSocketAddresses.ts"],"names":[],"mappings":";;;;AAAA,kCAQkB;AAElB,IAAM,gBAAgB;IAIpB,GAAC,yBAAiB,CAAC,aAAa,IAAG;QACjC,I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ACD,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,IAAI,EAAE,4CAA4C,CAAC,WAAW,EAAa;KAC5E;IACD,GAAC,yBAAiB,CAAC,SAAS,IAAG;QAC7B,IAAI,EAAE,4CAA4C,CAAC,WAAW,EAAa;KAC5E;IACD,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,IAAI,EAAE,4CAA4C,CAAC,WAAW,EAAa;KAC5E;OACF,CAAC;AAEK,IAAM,cAAc,GAAG,UAAC,MAA4B;IACzD,OAAO,YAAY,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAClE,CAAC,CAAC;AAFW,QAAA,cAAc,kBAEzB","sourcesContent":["import {\n ReyaChainId,\n GetSocketConnectorParams,\n Address,\n GetSocketControllerParams,\n MoneyInOutChainId,\n GetSocketVaultParams,\n SocketTokenConnectors,\n} from '../types';\n\nconst socketConnectors: Record<\n MoneyInOutChainId,\n Record<Uppercase<string>, SocketTokenConnectors>\n> = {\n [MoneyInOutChainId.polygonMumbai]: {\n USDC: {\n deposit:\n '0xF5b588306867992201fc78dE045bCe01BE6eA2fD'.toLowerCase() as Address,\n withdraw:\n '0x47E136cf4A96e1afa72e19022f9699Bbaa1BE60e'.toLowerCase() as Address,\n },\n },\n [MoneyInOutChainId.arbitrumSepolia]: {\n USDC: {\n deposit:\n '0xeD4F75f0C25963d2C61827261C2d7f84BF884c7F'.toLowerCase() as Address,\n withdraw:\n '0xCd2E3CCb0Eeec6F2762dcD5D24a76583b69f3Ee1'.toLowerCase() as Address,\n },\n },\n [MoneyInOutChainId.opSepolia]: {\n USDC: {\n deposit:\n '0x9838Fc33ea56F7664c677b1F2917c60d75a73BC6'.toLowerCase() as Address,\n withdraw:\n '0x9ca48cAF8AD2B081a0b633d6FCD803076F719fEa'.toLowerCase() as Address,\n },\n },\n [MoneyInOutChainId.ethereumSepolia]: {\n USDC: {\n deposit:\n '0x4BFDf43662cdf2Cc0A96C8697AC179819B6E5E91'.toLowerCase() as Address,\n withdraw:\n '0x1d43076909Ca139BFaC4EbB7194518bE3638fc76'.toLowerCase() as Address,\n },\n },\n};\n\nexport const getSocketConnectors = (\n params: GetSocketConnectorParams,\n): SocketTokenConnectors => {\n return socketConnectors[params.moneyInOutChainId][params.tokenName];\n};\n\nconst socketControllers: Record<\n ReyaChainId,\n Record<Uppercase<string>, Address>\n> = {\n [ReyaChainId.reyaCronos]: {\n USDC: '0xc5a5Ac67fff82Da72d1F862f1363E2b217a2A61A'.toLowerCase() as Address,\n },\n [ReyaChainId.reyaNetwork]: {\n USDC: '',\n },\n};\n\nexport const getSocketController = (\n params: GetSocketControllerParams,\n): Address => {\n return socketControllers[params.reyaChainId][params.tokenName];\n};\n\nconst socketVaults: Record<\n MoneyInOutChainId,\n Record<Uppercase<string>, Address>\n> = {\n [MoneyInOutChainId.polygonMumbai]: {\n USDC: '0xEC5b7075F581D46983EBe2Be6baB0f58Bf1E8C4b'.toLowerCase() as Address,\n },\n [MoneyInOutChainId.arbitrumSepolia]: {\n USDC: '0x85314b664cB2e443C93F09EDb51088f76b048212'.toLowerCase() as Address,\n },\n [MoneyInOutChainId.opSepolia]: {\n USDC: '0x1019958C2BD43B882a4e1349337a32Ef9563FC4D'.toLowerCase() as Address,\n },\n [MoneyInOutChainId.ethereumSepolia]: {\n USDC: '0x8487daa5864a5cE18E5a89406c11EC748da33fbB'.toLowerCase() as Address,\n },\n};\n\nexport const getSocketVault = (params: GetSocketVaultParams): Address => {\n return socketVaults[params.moneyInOutChainId][params.tokenName];\n};\n"]}
@@ -5,9 +5,6 @@ exports.getSocketWithdrawFees = void 0;
5
5
  var types_1 = require("../types");
6
6
  // todo-socket: this should be per reya chain id, token AND source chain id
7
7
  var socketWithdrawFees = (_a = {},
8
- _a[types_1.ReyaChainId.polygonMumbai] = {
9
- '': 0,
10
- },
11
8
  _a[types_1.ReyaChainId.reyaCronos] = {
12
9
  '0x1b700a40a0707dd5f0bc31cbc57d730558e5714d': 0,
13
10
  },
@@ -1 +1 @@
1
- {"version":3,"file":"getSocketWithdrawFees.js","sourceRoot":"/","sources":["services/getSocketWithdrawFees.ts"],"names":[],"mappings":";;;;AAAA,kCAKkB;AAElB,2EAA2E;AAC3E,IAAM,kBAAkB;IAItB,GAAC,mBAAW,CAAC,aAAa,IAAG;QAC3B,EAAE,EAAE,CAAC;KACN;IACD,GAAC,mBAAW,CAAC,UAAU,IAAG;QACxB,4CAA4C,EAAE,CAAC;KAChD;IACD,GAAC,mBAAW,CAAC,WAAW,IAAG;QACzB,EAAE,EAAE,CAAC;KACN;OACF,CAAC;AAEK,IAAM,qBAAqB,GAAG,UACnC,MAAmC;IAEnC,OAAO;QACL,IAAI,EAAE,kBAAkB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;KAClE,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,qBAAqB,yBAMhC","sourcesContent":["import {\n GetSocketWithdrawFeesParams,\n GetSocketWithdrawFeesResult,\n ReyaChainId,\n TokenEntity,\n} from '../types';\n\n// todo-socket: this should be per reya chain id, token AND source chain id\nconst socketWithdrawFees: Record<\n ReyaChainId,\n Record<TokenEntity['address'], number>\n> = {\n [ReyaChainId.polygonMumbai]: {\n '': 0,\n },\n [ReyaChainId.reyaCronos]: {\n '0x1b700a40a0707dd5f0bc31cbc57d730558e5714d': 0,\n },\n [ReyaChainId.reyaNetwork]: {\n '': 0,\n },\n};\n\nexport const getSocketWithdrawFees = (\n params: GetSocketWithdrawFeesParams,\n): GetSocketWithdrawFeesResult => {\n return {\n fees: socketWithdrawFees[params.reyaChainId][params.tokenAddress],\n };\n};\n"]}
1
+ {"version":3,"file":"getSocketWithdrawFees.js","sourceRoot":"/","sources":["services/getSocketWithdrawFees.ts"],"names":[],"mappings":";;;;AAAA,kCAKkB;AAElB,2EAA2E;AAC3E,IAAM,kBAAkB;IAItB,GAAC,mBAAW,CAAC,UAAU,IAAG;QACxB,4CAA4C,EAAE,CAAC;KAChD;IACD,GAAC,mBAAW,CAAC,WAAW,IAAG;QACzB,EAAE,EAAE,CAAC;KACN;OACF,CAAC;AAEK,IAAM,qBAAqB,GAAG,UACnC,MAAmC;IAEnC,OAAO;QACL,IAAI,EAAE,kBAAkB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;KAClE,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,qBAAqB,yBAMhC","sourcesContent":["import {\n GetSocketWithdrawFeesParams,\n GetSocketWithdrawFeesResult,\n ReyaChainId,\n TokenEntity,\n} from '../types';\n\n// todo-socket: this should be per reya chain id, token AND source chain id\nconst socketWithdrawFees: Record<\n ReyaChainId,\n Record<TokenEntity['address'], number>\n> = {\n [ReyaChainId.reyaCronos]: {\n '0x1b700a40a0707dd5f0bc31cbc57d730558e5714d': 0,\n },\n [ReyaChainId.reyaNetwork]: {\n '': 0,\n },\n};\n\nexport const getSocketWithdrawFees = (\n params: GetSocketWithdrawFeesParams,\n): GetSocketWithdrawFeesResult => {\n return {\n fees: socketWithdrawFees[params.reyaChainId][params.tokenAddress],\n };\n};\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './logger';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1,5 @@
1
+ export interface Loggable {
2
+ loggingEnabled: boolean;
3
+ }
4
+ export declare function Logger(logPrefix: string): (target: object, propertyKey: string | symbol, descriptor: PropertyDescriptor) => void;
5
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"/","sources":["decorators/logger.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,MAAM,CAAC,SAAS,EAAE,MAAM,YAE5B,MAAM,eACD,MAAM,GAAG,MAAM,cAChB,kBAAkB,UAWjC"}
@@ -4,4 +4,5 @@ export * from './utils';
4
4
  export * from './services';
5
5
  export * from './modules';
6
6
  export * from './rest';
7
+ export * from './decorators';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
@@ -9,6 +9,7 @@ export interface ServiceConfig {
9
9
  clientId: string;
10
10
  redirectURI: string;
11
11
  };
12
+ logging: boolean;
12
13
  }
13
14
  export declare const API_CLIENT_CONFIGS: Record<ServiceEnvironment, ServiceConfig>;
14
15
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"/","sources":["rest/helpers/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,KAAK,kBAAkB,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAC1D,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,kBAAkB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE;QACP,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,EAAE,aAAa,CAmCxE,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"/","sources":["rest/helpers/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,KAAK,kBAAkB,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAC1D,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,kBAAkB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE;QACP,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,EAAE,aAAa,CAsCxE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getSocketAddresses.d.ts","sourceRoot":"/","sources":["services/getSocketAddresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,wBAAwB,EACxB,OAAO,EACP,yBAAyB,EAEzB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAwClB,eAAO,MAAM,mBAAmB,WACtB,wBAAwB,KAC/B,qBAEF,CAAC;AAiBF,eAAO,MAAM,mBAAmB,WACtB,yBAAyB,KAChC,OAEF,CAAC;AAoBF,eAAO,MAAM,cAAc,WAAY,oBAAoB,KAAG,OAE7D,CAAC"}
1
+ {"version":3,"file":"getSocketAddresses.d.ts","sourceRoot":"/","sources":["services/getSocketAddresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,wBAAwB,EACxB,OAAO,EACP,yBAAyB,EAEzB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAwClB,eAAO,MAAM,mBAAmB,WACtB,wBAAwB,KAC/B,qBAEF,CAAC;AAcF,eAAO,MAAM,mBAAmB,WACtB,yBAAyB,KAChC,OAEF,CAAC;AAoBF,eAAO,MAAM,cAAc,WAAY,oBAAoB,KAAG,OAE7D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getSocketWithdrawFees.d.ts","sourceRoot":"/","sources":["services/getSocketWithdrawFees.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAG5B,MAAM,UAAU,CAAC;AAkBlB,eAAO,MAAM,qBAAqB,WACxB,2BAA2B,KAClC,2BAIF,CAAC"}
1
+ {"version":3,"file":"getSocketWithdrawFees.d.ts","sourceRoot":"/","sources":["services/getSocketWithdrawFees.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAG5B,MAAM,UAAU,CAAC;AAelB,eAAO,MAAM,qBAAqB,WACxB,2BAA2B,KAClC,2BAIF,CAAC"}
@@ -24,7 +24,6 @@ export type MarketEntity = {
24
24
  baseSpacing: number;
25
25
  };
26
26
  export declare enum ReyaChainId {
27
- polygonMumbai = 80001,
28
27
  reyaNetwork = 1729,
29
28
  reyaCronos = 89346161
30
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;AAGxC,MAAM,MAAM,eAAe,GAAG;IAC5B,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAA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,EAAE,OAAO,CAAC;CACrC,CAAC;AAGF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAGF,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,0BAA0B,EAAE,MAAM,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,QAAQ,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAEzC,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC"}
package/dist/types.js CHANGED
@@ -3,8 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FundingRateHistoryGranularity = exports.AllMarginAccountsBalanceGranularity = exports.MarginAccountCollateralsBalanceGranularity = exports.MarginAccountBalanceGranularity = exports.LpBalanceGranularity = exports.CandlesResolution = exports.MoneyInOutChainId = exports.ReyaChainId = void 0;
4
4
  var ReyaChainId;
5
5
  (function (ReyaChainId) {
6
- ReyaChainId[ReyaChainId["polygonMumbai"] = 80001] = "polygonMumbai";
7
- // TODO: add the correct ID here
8
6
  ReyaChainId[ReyaChainId["reyaNetwork"] = 1729] = "reyaNetwork";
9
7
  ReyaChainId[ReyaChainId["reyaCronos"] = 89346161] = "reyaCronos";
10
8
  })(ReyaChainId || (exports.ReyaChainId = ReyaChainId = {}));
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":";;;AA8BA,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,mEAAqB,CAAA;IACrB,gCAAgC;IAChC,8DAAkB,CAAA;IAClB,gEAAqB,CAAA;AACvB,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAED,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,+EAAqB,CAAA;IACrB,oFAAwB,CAAA;IACxB,0EAAoB,CAAA;IACpB,sFAA0B,CAAA;AAC5B,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B;AAED,IAAY,iBAQX;AARD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,2CAAsB,CAAA;IACtB,+CAA0B,CAAA;IAC1B,8CAAyB,CAAA;IACzB,uCAAkB,CAAA;IAClB,0CAAqB,CAAA;IACrB,qCAAgB,CAAA;AAClB,CAAC,EARW,iBAAiB,iCAAjB,iBAAiB,QAQ5B;AA0JD,0BAA0B;AAC1B,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B,+EAAsB,CAAA;IACtB,6EAAyB,CAAA;IACzB,4EAA6B,CAAA;IAC7B,+EAAkC,CAAA;IAClC,kFAAoC,CAAA;IACpC,iFAAoC,CAAA;AACtC,CAAC,EAPW,oBAAoB,oCAApB,oBAAoB,QAO/B;AA0ED,iCAAiC;AACjC,IAAY,+BAOX;AAPD,WAAY,+BAA+B;IACzC,qGAAsB,CAAA;IACtB,mGAAyB,CAAA;IACzB,kGAA6B,CAAA;IAC7B,qGAAkC,CAAA;IAClC,wGAAoC,CAAA;IACpC,uGAAoC,CAAA;AACtC,CAAC,EAPW,+BAA+B,+CAA/B,+BAA+B,QAO1C;AAWD,6CAA6C;AAC7C,IAAY,0CAOX;AAPD,WAAY,0CAA0C;IACpD,2HAAsB,CAAA;IACtB,yHAAyB,CAAA;IACzB,wHAA6B,CAAA;IAC7B,2HAAkC,CAAA;IAClC,8HAAoC,CAAA;IACpC,6HAAoC,CAAA;AACtC,CAAC,EAPW,0CAA0C,0DAA1C,0CAA0C,QAOrD;AA6BD,IAAY,mCAOX;AAPD,WAAY,mCAAmC;IAC7C,6GAAsB,CAAA;IACtB,2GAAyB,CAAA;IACzB,0GAA6B,CAAA;IAC7B,6GAAkC,CAAA;IAClC,gHAAoC,CAAA;IACpC,+GAAoC,CAAA;AACtC,CAAC,EAPW,mCAAmC,mDAAnC,mCAAmC,QAO9C;AAED,gCAAgC;AAChC,IAAY,6BAOX;AAPD,WAAY,6BAA6B;IACvC,iGAAsB,CAAA;IACtB,+FAAyB,CAAA;IACzB,8FAA6B,CAAA;IAC7B,iGAAkC,CAAA;IAClC,oGAAoC,CAAA;IACpC,mGAAoC,CAAA;AACtC,CAAC,EAPW,6BAA6B,6CAA7B,6BAA6B,QAOxC","sourcesContent":["import { Signer } from 'ethers';\n\nexport type Address = Lowercase<string>;\n\n// -- Markets --\nexport type MarketOrderInfo = {\n counterpartyAccountIds: number[];\n exchangeId: number;\n};\n\nexport type MarketEntity = {\n id: number;\n ticker: string;\n underlyingAsset: string;\n quoteToken: string;\n markPrice: number;\n isActive: boolean;\n maxLeverage: number;\n volume24H: number;\n priceChange24H: number;\n priceChange24HPercentage: number;\n openInterest: number;\n fundingRate: number;\n description: string;\n orderInfo: MarketOrderInfo;\n tickSizeDecimals: number;\n minOrderSize: number;\n baseSpacing: number;\n};\n\nexport enum ReyaChainId {\n polygonMumbai = 80001,\n // TODO: add the correct ID here\n reyaNetwork = 1729,\n reyaCronos = 89346161,\n}\n\nexport enum MoneyInOutChainId {\n polygonMumbai = 80001,\n arbitrumSepolia = 421614,\n opSepolia = 11155420,\n ethereumSepolia = 11155111,\n}\n\nexport enum CandlesResolution {\n ONE_MINUTE = '1MIN',\n FIVE_MINUTES = '5MINS',\n FIFTEEN_MINUTES = '15MINS',\n THIRTY_MINUTES = '30MINS',\n ONE_HOUR = '1HOUR',\n FOUR_HOURS = '4HOURS',\n ONE_DAY = '1DAY',\n}\n\n// -- Candles --\nexport interface Candle {\n id: string;\n startedAt: string;\n ticker: string;\n resolution: CandlesResolution;\n low: string;\n high: string;\n open: string;\n close: string;\n baseTokenVolume: string;\n usdVolume: string;\n trades: number;\n startingOpenInterest: string;\n}\n\n// -- Account --\n\nexport type Status = 'OPEN' | 'CLOSED' | 'LIQUIDATED' | 'FILLED';\nexport type Side = 'long' | 'short';\n\nexport type CollateralEntity = {\n token: string;\n percentage: number;\n balance: number;\n balanceRUSD: number;\n exchangeRate: number;\n exchangeRateChange24HPercentage: number;\n};\n\nexport type MarginAccountEntity = {\n id: number;\n name: string;\n marginRatioHealth: 'danger' | 'healthy' | 'warning';\n marginRatioPercentage: number;\n totalBalance: number;\n totalBalanceUnderlyingAsset: string;\n totalBalanceChange24HPercentage: 5;\n livePnL: number;\n livePnLUnderlyingAsset: string;\n realizedPnL: number;\n realizedPnLUnderlyingAsset: string;\n totalPositionsCount: number;\n collaterals: CollateralEntity[];\n positions: PositionEntity[];\n};\n\nexport type PositionEntity = {\n id: number;\n side: Side;\n size: number;\n base: number;\n price: number;\n markPrice: number;\n orderStatus: Status;\n realisedPnl?: number | null;\n unrealisedPnl?: number | null;\n liquidationPrice: number;\n fundingRate: number;\n market: MarketEntity;\n};\n\nexport type TradingHistoryEntity = {\n id: number;\n price: number;\n priceUnderlyingToken: string;\n size: number;\n sizeUnderlyingToken: string;\n timestampMillisecondsUTC: number;\n};\n\nexport type OrderType = 'market';\n\nexport type PositionHistoryType =\n | 'long-trade'\n | 'short-trade'\n | 'long-liquidation'\n | 'short-liquidation';\n\nexport type PositionHistoryEntity = {\n id: number;\n action: PositionHistoryType;\n orderType: OrderType;\n base: number;\n executionPrice: number;\n realisedPnl?: number | null;\n fees: number;\n timestamp: number;\n market: MarketEntity;\n};\n\nexport type LpPoolEntity = {\n id: number;\n name: string;\n description: string;\n longDescription: string;\n readMoreLink: string;\n currentAPY: number;\n apyChange24H: number;\n tokenAddress: Address;\n token: string;\n minDeposit: number;\n allowedChainsForLiquidity: MoneyInOutChainId[];\n};\n\nexport type LpWithdrawBalanceEntity = {\n withdrawableBalance: number;\n poolSharePrice: number;\n accountShareBalance: number;\n};\n\nexport type TransactionHistoryType = 'deposit' | 'withdrawal';\n\nexport type LpTransactionHistoryEntity = {\n id: number;\n type: TransactionHistoryType;\n token: string;\n amount: number;\n transactionLink: string;\n timestamp: number;\n};\n\nexport type LpPositionEntity = {\n id: number;\n capitalInvested: number;\n currentBalance: number;\n pnl: number;\n lpPool: LpPoolEntity;\n};\n\nexport type MarginAccountTransactionHistoryType =\n | 'deposit'\n | 'withdrawal'\n | 'transfer'\n | 'auto_exchange';\n\nexport type MarginAccountTransactionStatus = 'confirmed' | 'pending';\n\nexport type MarginAccountTransactionHistoryEntity = {\n id: number;\n type: MarginAccountTransactionHistoryType;\n token: string;\n amount: number;\n transactionLink: string;\n status: MarginAccountTransactionStatus;\n timestamp: number;\n};\n\nexport type TokenEntity = {\n id: string;\n address: Address;\n};\n// --- Lp Pool Balance ---\nexport enum LpBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\nexport type GetLpPoolBalanceChartDataResult = {\n data: {\n timestampInMs: number;\n value: number;\n }[];\n tvl: number;\n tvlChangePercentage: number;\n apy: number;\n apyChangePercentage: number;\n};\n\n// - LP Account Performance -\nexport type GetLpPoolPerformanceChartDataResult = {\n capitalInvestedData: {\n timestampInMs: number;\n value: number;\n }[];\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n balance: number;\n balanceChangePercentage: number;\n capitalInvested: number;\n capitalInvestedChangePercentage: number;\n};\n\nexport type SocketTokenConnectors = {\n deposit: Address;\n withdraw: Address;\n};\n\nexport type GetSocketConnectorParams = {\n moneyInOutChainId: MoneyInOutChainId;\n tokenName: Uppercase<string>;\n};\n\nexport type GetSocketControllerParams = {\n reyaChainId: ReyaChainId;\n tokenName: Uppercase<string>;\n};\n\nexport type GetSocketVaultParams = {\n moneyInOutChainId: MoneyInOutChainId;\n tokenName: Uppercase<string>;\n};\n\nexport type GetSocketBridgeTimeParams = {\n moneyInOutChainId: MoneyInOutChainId;\n};\n\nexport type GetSocketBridgeTimeResult = {\n bridgeTimeInMS: number;\n};\n\nexport type GetSocketDepositFeesParams = {\n moneyInOutChainId: MoneyInOutChainId;\n};\n\nexport type GetSocketDepositFeesResult = {\n fees: number;\n feesUnderlyingToken: string;\n};\n\nexport type GetSocketWithdrawFeesParams = {\n reyaChainId: ReyaChainId;\n tokenAddress: TokenEntity['address'];\n};\n\nexport type GetSocketWithdrawFeesResult = {\n fees: number;\n};\n\n// --- Margin Account Balance ---\nexport enum MarginAccountBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\nexport type GetMarginAccountBalanceChartDataResult = {\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n balance: number;\n balanceChangePercentage: number;\n};\n\n// --- Margin Account Collaterals Balance ---\nexport enum MarginAccountCollateralsBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\nexport type GetMarginAccountCollateralsBalanceChartDataResult = {\n data: {\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n token: string;\n }[];\n balance: number;\n balanceChangePercentage: number;\n};\n\nexport type OwnerMetadataEntity = {\n address: Address;\n coreSigNonce: number;\n poolSigNonce: number;\n};\n\nexport type GetAllMarginAccountsBalanceChartDataResult = {\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n balance: number;\n balanceChangePercentage: number;\n};\n\nexport enum AllMarginAccountsBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\n// --- Funding Rate History ----\nexport enum FundingRateHistoryGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\nexport type GetFundingRateChartDataResult = {\n fundingRateData: {\n timestampInMs: number;\n value: number;\n }[];\n fundingRate: number;\n};\n\nexport type GetERC20AllowanceParams = {\n walletAddress: string;\n tokenAddress: LpPoolEntity['tokenAddress'];\n spenderAddress: string;\n subject: Signer;\n};\n\nexport type DepthSimulationState = {\n spotPrice: number;\n maxLongExposure: number;\n maxShortExposure: number;\n netExposure: number;\n};\n\nexport type GetLpPoolDepthChartSimulationDataResult = DepthSimulationState;\n\nexport type SignatureData = {\n signature: string;\n timestamp: number;\n walletAddress: Address;\n message: string;\n};\n\nexport type SaveSignatureResult = {\n signatureSavedSuccessfully: boolean;\n};\n\n// --- Community ----\nexport type VoteDetailsEntity = {\n id: number;\n startDate: number; // timestamp in UTC milliseconds\n endDate: number; // timestamp in UTC milliseconds\n percentageToPass: number; // Example: 4%\n yesCount: number;\n noCount: number;\n voteCountToPass: number; // Example: 1453\n};\n\nexport type VoteStatusEntity = {\n votingPower: number;\n hasVoted: boolean;\n};\n\n// --- XP ----\nexport type XPEntity = {\n value: number;\n valueTimestampMilliseconds: number;\n rate: number;\n};\n\nexport type GetAccountLGEStatusParams = {\n address: string; // wallet address\n};\n\nexport type GetAccountLGEStatusResult = {\n xp: XPEntity;\n currentBoost: number;\n deposited: number;\n};\n\nexport type GetLGEBoostRateParams = void;\n\nexport type GetLGEBoostRateResult = number;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":";;;AA8BA,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,8DAAkB,CAAA;IAClB,gEAAqB,CAAA;AACvB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,+EAAqB,CAAA;IACrB,oFAAwB,CAAA;IACxB,0EAAoB,CAAA;IACpB,sFAA0B,CAAA;AAC5B,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B;AAED,IAAY,iBAQX;AARD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,2CAAsB,CAAA;IACtB,+CAA0B,CAAA;IAC1B,8CAAyB,CAAA;IACzB,uCAAkB,CAAA;IAClB,0CAAqB,CAAA;IACrB,qCAAgB,CAAA;AAClB,CAAC,EARW,iBAAiB,iCAAjB,iBAAiB,QAQ5B;AA0JD,0BAA0B;AAC1B,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B,+EAAsB,CAAA;IACtB,6EAAyB,CAAA;IACzB,4EAA6B,CAAA;IAC7B,+EAAkC,CAAA;IAClC,kFAAoC,CAAA;IACpC,iFAAoC,CAAA;AACtC,CAAC,EAPW,oBAAoB,oCAApB,oBAAoB,QAO/B;AA0ED,iCAAiC;AACjC,IAAY,+BAOX;AAPD,WAAY,+BAA+B;IACzC,qGAAsB,CAAA;IACtB,mGAAyB,CAAA;IACzB,kGAA6B,CAAA;IAC7B,qGAAkC,CAAA;IAClC,wGAAoC,CAAA;IACpC,uGAAoC,CAAA;AACtC,CAAC,EAPW,+BAA+B,+CAA/B,+BAA+B,QAO1C;AAWD,6CAA6C;AAC7C,IAAY,0CAOX;AAPD,WAAY,0CAA0C;IACpD,2HAAsB,CAAA;IACtB,yHAAyB,CAAA;IACzB,wHAA6B,CAAA;IAC7B,2HAAkC,CAAA;IAClC,8HAAoC,CAAA;IACpC,6HAAoC,CAAA;AACtC,CAAC,EAPW,0CAA0C,0DAA1C,0CAA0C,QAOrD;AA6BD,IAAY,mCAOX;AAPD,WAAY,mCAAmC;IAC7C,6GAAsB,CAAA;IACtB,2GAAyB,CAAA;IACzB,0GAA6B,CAAA;IAC7B,6GAAkC,CAAA;IAClC,gHAAoC,CAAA;IACpC,+GAAoC,CAAA;AACtC,CAAC,EAPW,mCAAmC,mDAAnC,mCAAmC,QAO9C;AAED,gCAAgC;AAChC,IAAY,6BAOX;AAPD,WAAY,6BAA6B;IACvC,iGAAsB,CAAA;IACtB,+FAAyB,CAAA;IACzB,8FAA6B,CAAA;IAC7B,iGAAkC,CAAA;IAClC,oGAAoC,CAAA;IACpC,mGAAoC,CAAA;AACtC,CAAC,EAPW,6BAA6B,6CAA7B,6BAA6B,QAOxC","sourcesContent":["import { Signer } from 'ethers';\n\nexport type Address = Lowercase<string>;\n\n// -- Markets --\nexport type MarketOrderInfo = {\n counterpartyAccountIds: number[];\n exchangeId: number;\n};\n\nexport type MarketEntity = {\n id: number;\n ticker: string;\n underlyingAsset: string;\n quoteToken: string;\n markPrice: number;\n isActive: boolean;\n maxLeverage: number;\n volume24H: number;\n priceChange24H: number;\n priceChange24HPercentage: number;\n openInterest: number;\n fundingRate: number;\n description: string;\n orderInfo: MarketOrderInfo;\n tickSizeDecimals: number;\n minOrderSize: number;\n baseSpacing: number;\n};\n\nexport enum ReyaChainId {\n reyaNetwork = 1729,\n reyaCronos = 89346161,\n}\n\nexport enum MoneyInOutChainId {\n polygonMumbai = 80001,\n arbitrumSepolia = 421614,\n opSepolia = 11155420,\n ethereumSepolia = 11155111,\n}\n\nexport enum CandlesResolution {\n ONE_MINUTE = '1MIN',\n FIVE_MINUTES = '5MINS',\n FIFTEEN_MINUTES = '15MINS',\n THIRTY_MINUTES = '30MINS',\n ONE_HOUR = '1HOUR',\n FOUR_HOURS = '4HOURS',\n ONE_DAY = '1DAY',\n}\n\n// -- Candles --\nexport interface Candle {\n id: string;\n startedAt: string;\n ticker: string;\n resolution: CandlesResolution;\n low: string;\n high: string;\n open: string;\n close: string;\n baseTokenVolume: string;\n usdVolume: string;\n trades: number;\n startingOpenInterest: string;\n}\n\n// -- Account --\n\nexport type Status = 'OPEN' | 'CLOSED' | 'LIQUIDATED' | 'FILLED';\nexport type Side = 'long' | 'short';\n\nexport type CollateralEntity = {\n token: string;\n percentage: number;\n balance: number;\n balanceRUSD: number;\n exchangeRate: number;\n exchangeRateChange24HPercentage: number;\n};\n\nexport type MarginAccountEntity = {\n id: number;\n name: string;\n marginRatioHealth: 'danger' | 'healthy' | 'warning';\n marginRatioPercentage: number;\n totalBalance: number;\n totalBalanceUnderlyingAsset: string;\n totalBalanceChange24HPercentage: 5;\n livePnL: number;\n livePnLUnderlyingAsset: string;\n realizedPnL: number;\n realizedPnLUnderlyingAsset: string;\n totalPositionsCount: number;\n collaterals: CollateralEntity[];\n positions: PositionEntity[];\n};\n\nexport type PositionEntity = {\n id: number;\n side: Side;\n size: number;\n base: number;\n price: number;\n markPrice: number;\n orderStatus: Status;\n realisedPnl?: number | null;\n unrealisedPnl?: number | null;\n liquidationPrice: number;\n fundingRate: number;\n market: MarketEntity;\n};\n\nexport type TradingHistoryEntity = {\n id: number;\n price: number;\n priceUnderlyingToken: string;\n size: number;\n sizeUnderlyingToken: string;\n timestampMillisecondsUTC: number;\n};\n\nexport type OrderType = 'market';\n\nexport type PositionHistoryType =\n | 'long-trade'\n | 'short-trade'\n | 'long-liquidation'\n | 'short-liquidation';\n\nexport type PositionHistoryEntity = {\n id: number;\n action: PositionHistoryType;\n orderType: OrderType;\n base: number;\n executionPrice: number;\n realisedPnl?: number | null;\n fees: number;\n timestamp: number;\n market: MarketEntity;\n};\n\nexport type LpPoolEntity = {\n id: number;\n name: string;\n description: string;\n longDescription: string;\n readMoreLink: string;\n currentAPY: number;\n apyChange24H: number;\n tokenAddress: Address;\n token: string;\n minDeposit: number;\n allowedChainsForLiquidity: MoneyInOutChainId[];\n};\n\nexport type LpWithdrawBalanceEntity = {\n withdrawableBalance: number;\n poolSharePrice: number;\n accountShareBalance: number;\n};\n\nexport type TransactionHistoryType = 'deposit' | 'withdrawal';\n\nexport type LpTransactionHistoryEntity = {\n id: number;\n type: TransactionHistoryType;\n token: string;\n amount: number;\n transactionLink: string;\n timestamp: number;\n};\n\nexport type LpPositionEntity = {\n id: number;\n capitalInvested: number;\n currentBalance: number;\n pnl: number;\n lpPool: LpPoolEntity;\n};\n\nexport type MarginAccountTransactionHistoryType =\n | 'deposit'\n | 'withdrawal'\n | 'transfer'\n | 'auto_exchange';\n\nexport type MarginAccountTransactionStatus = 'confirmed' | 'pending';\n\nexport type MarginAccountTransactionHistoryEntity = {\n id: number;\n type: MarginAccountTransactionHistoryType;\n token: string;\n amount: number;\n transactionLink: string;\n status: MarginAccountTransactionStatus;\n timestamp: number;\n};\n\nexport type TokenEntity = {\n id: string;\n address: Address;\n};\n// --- Lp Pool Balance ---\nexport enum LpBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\nexport type GetLpPoolBalanceChartDataResult = {\n data: {\n timestampInMs: number;\n value: number;\n }[];\n tvl: number;\n tvlChangePercentage: number;\n apy: number;\n apyChangePercentage: number;\n};\n\n// - LP Account Performance -\nexport type GetLpPoolPerformanceChartDataResult = {\n capitalInvestedData: {\n timestampInMs: number;\n value: number;\n }[];\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n balance: number;\n balanceChangePercentage: number;\n capitalInvested: number;\n capitalInvestedChangePercentage: number;\n};\n\nexport type SocketTokenConnectors = {\n deposit: Address;\n withdraw: Address;\n};\n\nexport type GetSocketConnectorParams = {\n moneyInOutChainId: MoneyInOutChainId;\n tokenName: Uppercase<string>;\n};\n\nexport type GetSocketControllerParams = {\n reyaChainId: ReyaChainId;\n tokenName: Uppercase<string>;\n};\n\nexport type GetSocketVaultParams = {\n moneyInOutChainId: MoneyInOutChainId;\n tokenName: Uppercase<string>;\n};\n\nexport type GetSocketBridgeTimeParams = {\n moneyInOutChainId: MoneyInOutChainId;\n};\n\nexport type GetSocketBridgeTimeResult = {\n bridgeTimeInMS: number;\n};\n\nexport type GetSocketDepositFeesParams = {\n moneyInOutChainId: MoneyInOutChainId;\n};\n\nexport type GetSocketDepositFeesResult = {\n fees: number;\n feesUnderlyingToken: string;\n};\n\nexport type GetSocketWithdrawFeesParams = {\n reyaChainId: ReyaChainId;\n tokenAddress: TokenEntity['address'];\n};\n\nexport type GetSocketWithdrawFeesResult = {\n fees: number;\n};\n\n// --- Margin Account Balance ---\nexport enum MarginAccountBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\nexport type GetMarginAccountBalanceChartDataResult = {\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n balance: number;\n balanceChangePercentage: number;\n};\n\n// --- Margin Account Collaterals Balance ---\nexport enum MarginAccountCollateralsBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\nexport type GetMarginAccountCollateralsBalanceChartDataResult = {\n data: {\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n token: string;\n }[];\n balance: number;\n balanceChangePercentage: number;\n};\n\nexport type OwnerMetadataEntity = {\n address: Address;\n coreSigNonce: number;\n poolSigNonce: number;\n};\n\nexport type GetAllMarginAccountsBalanceChartDataResult = {\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n balance: number;\n balanceChangePercentage: number;\n};\n\nexport enum AllMarginAccountsBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\n// --- Funding Rate History ----\nexport enum FundingRateHistoryGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\nexport type GetFundingRateChartDataResult = {\n fundingRateData: {\n timestampInMs: number;\n value: number;\n }[];\n fundingRate: number;\n};\n\nexport type GetERC20AllowanceParams = {\n walletAddress: string;\n tokenAddress: LpPoolEntity['tokenAddress'];\n spenderAddress: string;\n subject: Signer;\n};\n\nexport type DepthSimulationState = {\n spotPrice: number;\n maxLongExposure: number;\n maxShortExposure: number;\n netExposure: number;\n};\n\nexport type GetLpPoolDepthChartSimulationDataResult = DepthSimulationState;\n\nexport type SignatureData = {\n signature: string;\n timestamp: number;\n walletAddress: Address;\n message: string;\n};\n\nexport type SaveSignatureResult = {\n signatureSavedSuccessfully: boolean;\n};\n\n// --- Community ----\nexport type VoteDetailsEntity = {\n id: number;\n startDate: number; // timestamp in UTC milliseconds\n endDate: number; // timestamp in UTC milliseconds\n percentageToPass: number; // Example: 4%\n yesCount: number;\n noCount: number;\n voteCountToPass: number; // Example: 1453\n};\n\nexport type VoteStatusEntity = {\n votingPower: number;\n hasVoted: boolean;\n};\n\n// --- XP ----\nexport type XPEntity = {\n value: number;\n valueTimestampMilliseconds: number;\n rate: number;\n};\n\nexport type GetAccountLGEStatusParams = {\n address: string; // wallet address\n};\n\nexport type GetAccountLGEStatusResult = {\n xp: XPEntity;\n currentBoost: number;\n deposited: number;\n};\n\nexport type GetLGEBoostRateParams = void;\n\nexport type GetLGEBoostRateResult = number;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reyaxyz/common",
3
- "version": "0.43.0",
3
+ "version": "0.45.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -42,5 +42,5 @@
42
42
  "generate:coverage-badges": "npx istanbul-badges-readme --silent"
43
43
  },
44
44
  "packageManager": "pnpm@8.10.4",
45
- "gitHead": "18894640bcf98fce992197fe02eefa8ca99d3bee"
45
+ "gitHead": "450faab59074149c97db18a8d3330b5e1a9c73d7"
46
46
  }
@@ -0,0 +1 @@
1
+ export * from './logger';
@@ -0,0 +1,20 @@
1
+ export interface Loggable {
2
+ loggingEnabled: boolean;
3
+ }
4
+
5
+ export function Logger(logPrefix: string) {
6
+ return function (
7
+ target: object,
8
+ propertyKey: string | symbol,
9
+ descriptor: PropertyDescriptor,
10
+ ) {
11
+ const originalMethod = descriptor.value;
12
+
13
+ descriptor.value = function (...args: never[]) {
14
+ if ((this as Loggable).loggingEnabled) {
15
+ console.log(`[${logPrefix}]: called with args: `, args);
16
+ }
17
+ return originalMethod.apply(this, args);
18
+ };
19
+ };
20
+ }
package/src/index.ts CHANGED
@@ -4,3 +4,4 @@ export * from './utils';
4
4
  export * from './services';
5
5
  export * from './modules';
6
6
  export * from './rest';
7
+ export * from './decorators';
@@ -11,6 +11,7 @@ export interface ServiceConfig {
11
11
  clientId: string;
12
12
  redirectURI: string;
13
13
  };
14
+ logging: boolean;
14
15
  }
15
16
 
16
17
  export const API_CLIENT_CONFIGS: Record<ServiceEnvironment, ServiceConfig> = {
@@ -25,6 +26,7 @@ export const API_CLIENT_CONFIGS: Record<ServiceEnvironment, ServiceConfig> = {
25
26
  redirectURI:
26
27
  'https://m8mjgmqmte.eu-central-1.awsapprunner.com/api/twitter/share',
27
28
  },
29
+ logging: true,
28
30
  },
29
31
  production: {
30
32
  chain: ReyaChainId.reyaNetwork,
@@ -36,6 +38,7 @@ export const API_CLIENT_CONFIGS: Record<ServiceEnvironment, ServiceConfig> = {
36
38
  redirectURI:
37
39
  'https://mtducb79rf.eu-central-1.awsapprunner.com/api/twitter/share',
38
40
  },
41
+ logging: false,
39
42
  },
40
43
  test: {
41
44
  chain: ReyaChainId.reyaCronos,
@@ -47,5 +50,6 @@ export const API_CLIENT_CONFIGS: Record<ServiceEnvironment, ServiceConfig> = {
47
50
  redirectURI:
48
51
  'https://m8mjgmqmte.eu-central-1.awsapprunner.com/api/twitter/share',
49
52
  },
53
+ logging: true,
50
54
  },
51
55
  };
@@ -56,9 +56,6 @@ const socketControllers: Record<
56
56
  ReyaChainId,
57
57
  Record<Uppercase<string>, Address>
58
58
  > = {
59
- [ReyaChainId.polygonMumbai]: {
60
- USDC: '',
61
- },
62
59
  [ReyaChainId.reyaCronos]: {
63
60
  USDC: '0xc5a5Ac67fff82Da72d1F862f1363E2b217a2A61A'.toLowerCase() as Address,
64
61
  },
@@ -10,9 +10,6 @@ const socketWithdrawFees: Record<
10
10
  ReyaChainId,
11
11
  Record<TokenEntity['address'], number>
12
12
  > = {
13
- [ReyaChainId.polygonMumbai]: {
14
- '': 0,
15
- },
16
13
  [ReyaChainId.reyaCronos]: {
17
14
  '0x1b700a40a0707dd5f0bc31cbc57d730558e5714d': 0,
18
15
  },
package/src/types.ts CHANGED
@@ -29,8 +29,6 @@ export type MarketEntity = {
29
29
  };
30
30
 
31
31
  export enum ReyaChainId {
32
- polygonMumbai = 80001,
33
- // TODO: add the correct ID here
34
32
  reyaNetwork = 1729,
35
33
  reyaCronos = 89346161,
36
34
  }