@reyaxyz/community-sdk 0.53.2 → 0.53.4

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.
@@ -75,9 +75,31 @@ var LGEModule = /** @class */ (function (_super) {
75
75
  });
76
76
  });
77
77
  };
78
+ // TODO: implement this mock
79
+ LGEModule.prototype.getReyaChecker = function (params) {
80
+ return __awaiter(this, void 0, void 0, function () {
81
+ var walletNumber, isEligibleForRcp, isEligibleForVltz, isEligibleForOgNft, isEligibleForOthers;
82
+ return __generator(this, function (_a) {
83
+ walletNumber = parseInt(params.wallet.slice(-1));
84
+ isEligibleForRcp = walletNumber % 2 === 0;
85
+ isEligibleForVltz = walletNumber % 3 === 0;
86
+ isEligibleForOgNft = walletNumber % 4 === 0;
87
+ isEligibleForOthers = walletNumber % 5 === 0;
88
+ return [2 /*return*/, {
89
+ isEligibleForRcp: isEligibleForRcp,
90
+ isEligibleForVltz: isEligibleForVltz,
91
+ isEligibleForOgNft: isEligibleForOgNft,
92
+ isEligibleForOthers: isEligibleForOthers,
93
+ }];
94
+ });
95
+ });
96
+ };
78
97
  __decorate([
79
98
  (0, common_1.Logger)('LGEModule.getLpTvl')
80
99
  ], LGEModule.prototype, "getLpTvl", null);
100
+ __decorate([
101
+ (0, common_1.Logger)('LGEModule.getReyaChecker')
102
+ ], LGEModule.prototype, "getReyaChecker", null);
81
103
  return LGEModule;
82
104
  }(common_1.RestClient));
83
105
  exports.default = LGEModule;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/lge/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA+D;AAI/D;IAAuC,6BAAU;IAG/C,mBAAY,MAAc,EAAE,cAAuB;QACjD,YAAA,MAAK,YAAC,MAAM,CAAC,SAAC;QAHhB,oBAAc,GAAY,KAAK,CAAC;QAI9B,KAAI,CAAC,cAAc,GAAG,cAAc,CAAC;;IACvC,CAAC;IAGK,4BAAQ,GAAR;;;;gBACE,GAAG,GAAG,gBAAgB,CAAC;gBAC7B,sBAAO,IAAI,CAAC,GAAG,CAAiB,GAAG,CAAC,EAAC;;;KACtC;IAHK;QADL,IAAA,eAAM,EAAC,oBAAoB,CAAC;6CAI5B;IACH,gBAAC;CAAA,AAbD,CAAuC,mBAAU,GAahD;kBAboB,SAAS","sourcesContent":["import { RestClient, Loggable, Logger } from '@reyaxyz/common';\n\nimport { GetLpTvlResult } from './types';\n\nexport default class LGEModule extends RestClient implements Loggable {\n loggingEnabled: boolean = false;\n\n constructor(apiUrl: string, loggingEnabled: boolean) {\n super(apiUrl);\n this.loggingEnabled = loggingEnabled;\n }\n\n @Logger('LGEModule.getLpTvl')\n async getLpTvl() {\n const uri = `/api/xp/lp-tvl`;\n return this.get<GetLpTvlResult>(uri);\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/lge/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA+D;AAI/D;IAAuC,6BAAU;IAG/C,mBAAY,MAAc,EAAE,cAAuB;QACjD,YAAA,MAAK,YAAC,MAAM,CAAC,SAAC;QAHhB,oBAAc,GAAY,KAAK,CAAC;QAI9B,KAAI,CAAC,cAAc,GAAG,cAAc,CAAC;;IACvC,CAAC;IAGK,4BAAQ,GAAR;;;;gBACE,GAAG,GAAG,gBAAgB,CAAC;gBAC7B,sBAAO,IAAI,CAAC,GAAG,CAAiB,GAAG,CAAC,EAAC;;;KACtC;IAED,4BAA4B;IAEtB,kCAAc,GAAd,UAAe,MAA4B;;;;gBACzC,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACjD,gBAAgB,GAAG,YAAY,GAAG,CAAC,KAAK,CAAC,CAAC;gBAC1C,iBAAiB,GAAG,YAAY,GAAG,CAAC,KAAK,CAAC,CAAC;gBAC3C,kBAAkB,GAAG,YAAY,GAAG,CAAC,KAAK,CAAC,CAAC;gBAC5C,mBAAmB,GAAG,YAAY,GAAG,CAAC,KAAK,CAAC,CAAC;gBACnD,sBAAO;wBACL,gBAAgB,kBAAA;wBAChB,iBAAiB,mBAAA;wBACjB,kBAAkB,oBAAA;wBAClB,mBAAmB,qBAAA;qBACpB,EAAC;;;KACH;IAnBK;QADL,IAAA,eAAM,EAAC,oBAAoB,CAAC;6CAI5B;IAIK;QADL,IAAA,eAAM,EAAC,0BAA0B,CAAC;mDAalC;IACH,gBAAC;CAAA,AA7BD,CAAuC,mBAAU,GA6BhD;kBA7BoB,SAAS","sourcesContent":["import { RestClient, Loggable, Logger } from '@reyaxyz/common';\n\nimport { GetLpTvlResult, GetReyaCheckerParams } from './types';\n\nexport default class LGEModule extends RestClient implements Loggable {\n loggingEnabled: boolean = false;\n\n constructor(apiUrl: string, loggingEnabled: boolean) {\n super(apiUrl);\n this.loggingEnabled = loggingEnabled;\n }\n\n @Logger('LGEModule.getLpTvl')\n async getLpTvl() {\n const uri = `/api/xp/lp-tvl`;\n return this.get<GetLpTvlResult>(uri);\n }\n\n // TODO: implement this mock\n @Logger('LGEModule.getReyaChecker')\n async getReyaChecker(params: GetReyaCheckerParams) {\n const walletNumber = parseInt(params.wallet.slice(-1));\n const isEligibleForRcp = walletNumber % 2 === 0;\n const isEligibleForVltz = walletNumber % 3 === 0;\n const isEligibleForOgNft = walletNumber % 4 === 0;\n const isEligibleForOthers = walletNumber % 5 === 0;\n return {\n isEligibleForRcp,\n isEligibleForVltz,\n isEligibleForOgNft,\n isEligibleForOthers,\n };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"/","sources":["modules/lge/types.ts"],"names":[],"mappings":"","sourcesContent":["export { GetLpTvlResult, Rank, RankTrading } from '@reyaxyz/common';\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"/","sources":["modules/lge/types.ts"],"names":[],"mappings":"","sourcesContent":["export { GetLpTvlResult, Rank, RankTrading } from '@reyaxyz/common';\n\nexport type GetReyaCheckerParams = {\n wallet: string;\n};\n\nexport type GetReyaCheckerResult = {\n isEligibleForRcp: boolean;\n isEligibleForVltz: boolean;\n isEligibleForOgNft: boolean;\n isEligibleForOthers: boolean;\n};\n"]}
@@ -1,8 +1,14 @@
1
1
  import { RestClient, Loggable } from '@reyaxyz/common';
2
- import { GetLpTvlResult } from './types';
2
+ import { GetLpTvlResult, GetReyaCheckerParams } from './types';
3
3
  export default class LGEModule extends RestClient implements Loggable {
4
4
  loggingEnabled: boolean;
5
5
  constructor(apiUrl: string, loggingEnabled: boolean);
6
6
  getLpTvl(): Promise<GetLpTvlResult>;
7
+ getReyaChecker(params: GetReyaCheckerParams): Promise<{
8
+ isEligibleForRcp: boolean;
9
+ isEligibleForVltz: boolean;
10
+ isEligibleForOgNft: boolean;
11
+ isEligibleForOthers: boolean;
12
+ }>;
7
13
  }
8
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/lge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAU,MAAM,iBAAiB,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,UAAW,YAAW,QAAQ;IACnE,cAAc,EAAE,OAAO,CAAS;gBAEpB,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO;IAM7C,QAAQ;CAIf"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/lge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAU,MAAM,iBAAiB,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/D,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,UAAW,YAAW,QAAQ;IACnE,cAAc,EAAE,OAAO,CAAS;gBAEpB,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO;IAM7C,QAAQ;IAOR,cAAc,CAAC,MAAM,EAAE,oBAAoB;;;;;;CAalD"}
@@ -1,2 +1,11 @@
1
1
  export { GetLpTvlResult, Rank, RankTrading } from '@reyaxyz/common';
2
+ export type GetReyaCheckerParams = {
3
+ wallet: string;
4
+ };
5
+ export type GetReyaCheckerResult = {
6
+ isEligibleForRcp: boolean;
7
+ isEligibleForVltz: boolean;
8
+ isEligibleForOgNft: boolean;
9
+ isEligibleForOthers: boolean;
10
+ };
2
11
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["modules/lge/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["modules/lge/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEpE,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;CAC9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reyaxyz/community-sdk",
3
- "version": "0.53.2",
3
+ "version": "0.53.4",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -10,8 +10,8 @@
10
10
  "url": "https://github.com/Reya-Labs/reya-off-chain-monorepo.git"
11
11
  },
12
12
  "dependencies": {
13
- "@reyaxyz/common": "0.324.1",
14
- "@reyaxyz/sdk": "0.140.3",
13
+ "@reyaxyz/common": "0.324.2",
14
+ "@reyaxyz/sdk": "0.140.4",
15
15
  "ethers": "6.9.0"
16
16
  },
17
17
  "main": "dist/index.js",
@@ -38,5 +38,5 @@
38
38
  "generate:coverage-badges": "npx istanbul-badges-readme --silent"
39
39
  },
40
40
  "packageManager": "pnpm@8.3.1",
41
- "gitHead": "60883c43c6ba4b6a9450adf4c132ce7d747659b8"
41
+ "gitHead": "6ca8943813f62d219a3a8c71eff0971ff462b977"
42
42
  }
@@ -1,6 +1,6 @@
1
1
  import { RestClient, Loggable, Logger } from '@reyaxyz/common';
2
2
 
3
- import { GetLpTvlResult } from './types';
3
+ import { GetLpTvlResult, GetReyaCheckerParams } from './types';
4
4
 
5
5
  export default class LGEModule extends RestClient implements Loggable {
6
6
  loggingEnabled: boolean = false;
@@ -15,4 +15,20 @@ export default class LGEModule extends RestClient implements Loggable {
15
15
  const uri = `/api/xp/lp-tvl`;
16
16
  return this.get<GetLpTvlResult>(uri);
17
17
  }
18
+
19
+ // TODO: implement this mock
20
+ @Logger('LGEModule.getReyaChecker')
21
+ async getReyaChecker(params: GetReyaCheckerParams) {
22
+ const walletNumber = parseInt(params.wallet.slice(-1));
23
+ const isEligibleForRcp = walletNumber % 2 === 0;
24
+ const isEligibleForVltz = walletNumber % 3 === 0;
25
+ const isEligibleForOgNft = walletNumber % 4 === 0;
26
+ const isEligibleForOthers = walletNumber % 5 === 0;
27
+ return {
28
+ isEligibleForRcp,
29
+ isEligibleForVltz,
30
+ isEligibleForOgNft,
31
+ isEligibleForOthers,
32
+ };
33
+ }
18
34
  }
@@ -1 +1,12 @@
1
1
  export { GetLpTvlResult, Rank, RankTrading } from '@reyaxyz/common';
2
+
3
+ export type GetReyaCheckerParams = {
4
+ wallet: string;
5
+ };
6
+
7
+ export type GetReyaCheckerResult = {
8
+ isEligibleForRcp: boolean;
9
+ isEligibleForVltz: boolean;
10
+ isEligibleForOgNft: boolean;
11
+ isEligibleForOthers: boolean;
12
+ };