@reyaxyz/community-sdk 0.30.8 → 0.31.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.
@@ -75,9 +75,21 @@ var LGEModule = /** @class */ (function (_super) {
75
75
  });
76
76
  });
77
77
  };
78
+ LGEModule.prototype.getWalletReferralCode = function (params) {
79
+ return __awaiter(this, void 0, void 0, function () {
80
+ var uri;
81
+ return __generator(this, function (_a) {
82
+ uri = "/api/xp/get-referral-code/".concat(params.address);
83
+ return [2 /*return*/, this.get(uri)];
84
+ });
85
+ });
86
+ };
78
87
  __decorate([
79
88
  (0, common_1.Logger)('ReferralModule.getWalletReferralDetails')
80
89
  ], LGEModule.prototype, "getWalletReferralDetails", null);
90
+ __decorate([
91
+ (0, common_1.Logger)('ReferralModule.getWalletReferralCode')
92
+ ], LGEModule.prototype, "getWalletReferralCode", null);
81
93
  return LGEModule;
82
94
  }(common_1.RestClient));
83
95
  exports.default = LGEModule;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/referral/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA+D;AAO/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,4CAAwB,GAAxB,UAAyB,MAAsC;;;;gBAC7D,GAAG,GAAG,uCAAgC,MAAM,CAAC,OAAO,CAAE,CAAC;gBAC7D,sBAAO,IAAI,CAAC,GAAG,CAAiC,GAAG,CAAC,EAAC;;;KACtD;IAHK;QADL,IAAA,eAAM,EAAC,yCAAyC,CAAC;6DAIjD;IACH,gBAAC;CAAA,AAbD,CAAuC,mBAAU,GAahD;kBAboB,SAAS","sourcesContent":["import { Loggable, Logger, RestClient } from '@reyaxyz/common';\n\nimport {\n GetWalletReferralDetailsParams,\n GetWalletReferralDetailsResult,\n} 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('ReferralModule.getWalletReferralDetails')\n async getWalletReferralDetails(params: GetWalletReferralDetailsParams) {\n const uri = `/api/xp/get-referral-profile/${params.address}`;\n return this.get<GetWalletReferralDetailsResult>(uri);\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/referral/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA+D;AAS/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,4CAAwB,GAAxB,UAAyB,MAAsC;;;;gBAC7D,GAAG,GAAG,uCAAgC,MAAM,CAAC,OAAO,CAAE,CAAC;gBAC7D,sBAAO,IAAI,CAAC,GAAG,CAAiC,GAAG,CAAC,EAAC;;;KACtD;IAGK,yCAAqB,GAArB,UAAsB,MAAmC;;;;gBACvD,GAAG,GAAG,oCAA6B,MAAM,CAAC,OAAO,CAAE,CAAC;gBAC1D,sBAAO,IAAI,CAAC,GAAG,CAA8B,GAAG,CAAC,EAAC;;;KACnD;IATK;QADL,IAAA,eAAM,EAAC,yCAAyC,CAAC;6DAIjD;IAGK;QADL,IAAA,eAAM,EAAC,sCAAsC,CAAC;0DAI9C;IACH,gBAAC;CAAA,AAnBD,CAAuC,mBAAU,GAmBhD;kBAnBoB,SAAS","sourcesContent":["import { Loggable, Logger, RestClient } from '@reyaxyz/common';\n\nimport {\n GetWalletReferralDetailsParams,\n GetWalletReferralDetailsResult,\n GetWalletReferralCodeParams,\n GetWalletReferralCodeResult,\n} 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('ReferralModule.getWalletReferralDetails')\n async getWalletReferralDetails(params: GetWalletReferralDetailsParams) {\n const uri = `/api/xp/get-referral-profile/${params.address}`;\n return this.get<GetWalletReferralDetailsResult>(uri);\n }\n\n @Logger('ReferralModule.getWalletReferralCode')\n async getWalletReferralCode(params: GetWalletReferralCodeParams) {\n const uri = `/api/xp/get-referral-code/${params.address}`;\n return this.get<GetWalletReferralCodeResult>(uri);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"/","sources":["modules/referral/types.ts"],"names":[],"mappings":"","sourcesContent":["export {\n GetWalletReferralDetailsParams,\n GetWalletReferralDetailsResult,\n} from '@reyaxyz/common';\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"/","sources":["modules/referral/types.ts"],"names":[],"mappings":"","sourcesContent":["export {\n GetWalletReferralDetailsParams,\n GetWalletReferralDetailsResult,\n GetWalletReferralCodeParams,\n GetWalletReferralCodeResult,\n} from '@reyaxyz/common';\n"]}
@@ -81,7 +81,7 @@ var VoteModule = /** @class */ (function (_super) {
81
81
  return __awaiter(this, void 0, void 0, function () {
82
82
  var uri;
83
83
  return __generator(this, function (_a) {
84
- uri = "/api/vote/".concat(params.id);
84
+ uri = "/api/vote/".concat(params.slug);
85
85
  return [2 /*return*/, this.get(uri)];
86
86
  });
87
87
  });
@@ -90,7 +90,7 @@ var VoteModule = /** @class */ (function (_super) {
90
90
  return __awaiter(this, void 0, void 0, function () {
91
91
  var uri;
92
92
  return __generator(this, function (_a) {
93
- uri = "/api/vote/".concat(params.id, "/user/").concat(params.address);
93
+ uri = "/api/vote/".concat(params.slug, "/user/").concat(params.address);
94
94
  return [2 /*return*/, this.get(uri)];
95
95
  });
96
96
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/vote/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA6C;AAQ7C,uCAAkC;AAClC,0CAAmD;AAEnD;IAAwC,8BAAU;IAGhD,oBAAY,MAAc,EAAE,cAAuB;QACjD,YAAA,MAAK,YAAC,MAAM,CAAC,SAAC;QAHhB,oBAAc,GAAY,KAAK,CAAC;QAI9B,KAAI,CAAC,cAAc,GAAG,cAAc,CAAC;;IACvC,CAAC;IAED,QAAQ;IAEF,yBAAI,GAAJ,UAAK,MAAkB;;;gBAC3B,sBAAO,IAAA,eAAI,EAAC,MAAM,CAAC,EAAC;;;KACrB;IAED,OAAO;IAED,mCAAc,GAAd,UAAe,MAA4B;;;;gBACzC,GAAG,GAAG,oBAAa,MAAM,CAAC,EAAE,CAAE,CAAC;gBACrC,sBAAO,IAAI,CAAC,GAAG,CAAuB,GAAG,CAAC,EAAC;;;KAC5C;IAGK,kCAAa,GAAb,UAAc,MAA2B;;;;gBACvC,GAAG,GAAG,oBAAa,MAAM,CAAC,EAAE,mBAAS,MAAM,CAAC,OAAO,CAAE,CAAC;gBAC5D,sBAAO,IAAI,CAAC,GAAG,CAAsB,GAAG,CAAC,EAAC;;;KAC3C;IAfK;QADL,IAAA,eAAM,EAAC,iBAAiB,CAAC;0CAGzB;IAIK;QADL,IAAA,eAAM,EAAC,2BAA2B,CAAC;oDAInC;IAGK;QADL,IAAA,eAAM,EAAC,0BAA0B,CAAC;mDAIlC;IACH,iBAAC;CAAA,AA1BD,CAAwC,mBAAU,GA0BjD;kBA1BoB,UAAU","sourcesContent":["import { RestClient } from '@reyaxyz/common';\nimport {\n GetVoteDetailsParams,\n GetVoteDetailsResult,\n GetVoteStatusParams,\n GetVoteStatusResult,\n VoteParams,\n} from './types';\nimport { vote } from './services';\nimport { Logger, Loggable } from '@reyaxyz/common';\n\nexport default class VoteModule 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 // WRITE\n @Logger('VoteModule.vote')\n async vote(params: VoteParams) {\n return vote(params);\n }\n\n // READ\n @Logger('VoteModule.getVoteDetails')\n async getVoteDetails(params: GetVoteDetailsParams) {\n const uri = `/api/vote/${params.id}`;\n return this.get<GetVoteDetailsResult>(uri);\n }\n\n @Logger('VoteModule.getVoteStatus')\n async getVoteStatus(params: GetVoteStatusParams) {\n const uri = `/api/vote/${params.id}/user/${params.address}`;\n return this.get<GetVoteStatusResult>(uri);\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/vote/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA6C;AAQ7C,uCAAkC;AAClC,0CAAmD;AAEnD;IAAwC,8BAAU;IAGhD,oBAAY,MAAc,EAAE,cAAuB;QACjD,YAAA,MAAK,YAAC,MAAM,CAAC,SAAC;QAHhB,oBAAc,GAAY,KAAK,CAAC;QAI9B,KAAI,CAAC,cAAc,GAAG,cAAc,CAAC;;IACvC,CAAC;IAED,QAAQ;IAEF,yBAAI,GAAJ,UAAK,MAAkB;;;gBAC3B,sBAAO,IAAA,eAAI,EAAC,MAAM,CAAC,EAAC;;;KACrB;IAED,OAAO;IAED,mCAAc,GAAd,UAAe,MAA4B;;;;gBACzC,GAAG,GAAG,oBAAa,MAAM,CAAC,IAAI,CAAE,CAAC;gBACvC,sBAAO,IAAI,CAAC,GAAG,CAAuB,GAAG,CAAC,EAAC;;;KAC5C;IAGK,kCAAa,GAAb,UAAc,MAA2B;;;;gBACvC,GAAG,GAAG,oBAAa,MAAM,CAAC,IAAI,mBAAS,MAAM,CAAC,OAAO,CAAE,CAAC;gBAC9D,sBAAO,IAAI,CAAC,GAAG,CAAsB,GAAG,CAAC,EAAC;;;KAC3C;IAfK;QADL,IAAA,eAAM,EAAC,iBAAiB,CAAC;0CAGzB;IAIK;QADL,IAAA,eAAM,EAAC,2BAA2B,CAAC;oDAInC;IAGK;QADL,IAAA,eAAM,EAAC,0BAA0B,CAAC;mDAIlC;IACH,iBAAC;CAAA,AA1BD,CAAwC,mBAAU,GA0BjD;kBA1BoB,UAAU","sourcesContent":["import { RestClient } from '@reyaxyz/common';\nimport {\n GetVoteDetailsParams,\n GetVoteDetailsResult,\n GetVoteStatusParams,\n GetVoteStatusResult,\n VoteParams,\n} from './types';\nimport { vote } from './services';\nimport { Logger, Loggable } from '@reyaxyz/common';\n\nexport default class VoteModule 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 // WRITE\n @Logger('VoteModule.vote')\n async vote(params: VoteParams) {\n return vote(params);\n }\n\n // READ\n @Logger('VoteModule.getVoteDetails')\n async getVoteDetails(params: GetVoteDetailsParams) {\n const uri = `/api/vote/${params.slug}`;\n return this.get<GetVoteDetailsResult>(uri);\n }\n\n @Logger('VoteModule.getVoteStatus')\n async getVoteStatus(params: GetVoteStatusParams) {\n const uri = `/api/vote/${params.slug}/user/${params.address}`;\n return this.get<GetVoteStatusResult>(uri);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"/","sources":["modules/vote/types.ts"],"names":[],"mappings":"","sourcesContent":["import { JsonRpcSigner, Signer } from 'ethers';\nimport { VoteDetailsEntity, VoteStatusEntity } from '@reyaxyz/common';\n\nexport type VoteResult = {\n transactionHash: string | null;\n};\n\nexport type GetVoteDetailsParams = {\n id: VoteDetailsEntity['id'];\n // TODO: Ioana make this required and remove id\n slug?: VoteDetailsEntity['slug'];\n};\nexport type GetVoteDetailsResult = VoteDetailsEntity;\n\nexport type VoteParams = {\n id: VoteDetailsEntity['id'];\n // TODO: Ioana make this required and remove id\n slug?: VoteDetailsEntity['slug'];\n voted: 'yes' | 'no';\n signer: Signer | JsonRpcSigner;\n};\n\nexport type GetVoteStatusParams = {\n address: string;\n id: VoteDetailsEntity['id'];\n // TODO: Ioana make this required and remove id\n slug?: VoteDetailsEntity['slug'];\n};\nexport type GetVoteStatusResult = VoteStatusEntity;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"/","sources":["modules/vote/types.ts"],"names":[],"mappings":"","sourcesContent":["import { JsonRpcSigner, Signer } from 'ethers';\nimport { VoteDetailsEntity, VoteStatusEntity } from '@reyaxyz/common';\n\nexport type VoteResult = {\n transactionHash: string | null;\n};\n\nexport type GetVoteDetailsParams = {\n slug: VoteDetailsEntity['slug'];\n};\nexport type GetVoteDetailsResult = VoteDetailsEntity;\n\nexport type VoteParams = {\n slug: VoteDetailsEntity['slug'];\n voted: 'yes' | 'no';\n signer: Signer | JsonRpcSigner;\n};\n\nexport type GetVoteStatusParams = {\n address: string;\n slug: VoteDetailsEntity['slug'];\n};\nexport type GetVoteStatusResult = VoteStatusEntity;\n"]}
@@ -1,8 +1,9 @@
1
1
  import { Loggable, RestClient } from '@reyaxyz/common';
2
- import { GetWalletReferralDetailsParams, GetWalletReferralDetailsResult } from './types';
2
+ import { GetWalletReferralDetailsParams, GetWalletReferralDetailsResult, GetWalletReferralCodeParams, GetWalletReferralCodeResult } 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
  getWalletReferralDetails(params: GetWalletReferralDetailsParams): Promise<GetWalletReferralDetailsResult>;
7
+ getWalletReferralCode(params: GetWalletReferralCodeParams): Promise<GetWalletReferralCodeResult>;
7
8
  }
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/referral/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAU,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE/D,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,EAC/B,MAAM,SAAS,CAAC;AAEjB,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,UAAW,YAAW,QAAQ;IACnE,cAAc,EAAE,OAAO,CAAS;gBAEpB,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO;IAM7C,wBAAwB,CAAC,MAAM,EAAE,8BAA8B;CAItE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/referral/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAU,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE/D,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,EAC9B,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,SAAS,CAAC;AAEjB,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,UAAW,YAAW,QAAQ;IACnE,cAAc,EAAE,OAAO,CAAS;gBAEpB,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO;IAM7C,wBAAwB,CAAC,MAAM,EAAE,8BAA8B;IAM/D,qBAAqB,CAAC,MAAM,EAAE,2BAA2B;CAIhE"}
@@ -1,2 +1,2 @@
1
- export { GetWalletReferralDetailsParams, GetWalletReferralDetailsResult, } from '@reyaxyz/common';
1
+ export { GetWalletReferralDetailsParams, GetWalletReferralDetailsResult, GetWalletReferralCodeParams, GetWalletReferralCodeResult, } from '@reyaxyz/common';
2
2
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["modules/referral/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["modules/referral/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,EAC9B,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,iBAAiB,CAAC"}
@@ -4,20 +4,17 @@ export type VoteResult = {
4
4
  transactionHash: string | null;
5
5
  };
6
6
  export type GetVoteDetailsParams = {
7
- id: VoteDetailsEntity['id'];
8
- slug?: VoteDetailsEntity['slug'];
7
+ slug: VoteDetailsEntity['slug'];
9
8
  };
10
9
  export type GetVoteDetailsResult = VoteDetailsEntity;
11
10
  export type VoteParams = {
12
- id: VoteDetailsEntity['id'];
13
- slug?: VoteDetailsEntity['slug'];
11
+ slug: VoteDetailsEntity['slug'];
14
12
  voted: 'yes' | 'no';
15
13
  signer: Signer | JsonRpcSigner;
16
14
  };
17
15
  export type GetVoteStatusParams = {
18
16
  address: string;
19
- id: VoteDetailsEntity['id'];
20
- slug?: VoteDetailsEntity['slug'];
17
+ slug: VoteDetailsEntity['slug'];
21
18
  };
22
19
  export type GetVoteStatusResult = VoteStatusEntity;
23
20
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["modules/vote/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEtE,MAAM,MAAM,UAAU,GAAG;IACvB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAE5B,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;CAClC,CAAC;AACF,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AAErD,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAE5B,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACjC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,aAAa,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAE5B,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;CAClC,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["modules/vote/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEtE,MAAM,MAAM,UAAU,GAAG;IACvB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;CACjC,CAAC;AACF,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AAErD,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,aAAa,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;CACjC,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reyaxyz/community-sdk",
3
- "version": "0.30.8",
3
+ "version": "0.31.0",
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.86.1",
14
- "@reyaxyz/sdk": "0.75.4",
13
+ "@reyaxyz/common": "0.87.0",
14
+ "@reyaxyz/sdk": "0.75.5",
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": "3ee3589647d0f07c75ccdaf78dbb6e3149bf14bf"
41
+ "gitHead": "d37fce536a0bbfd5070c1ceaed643f27b34d31ed"
42
42
  }
@@ -3,6 +3,8 @@ import { Loggable, Logger, RestClient } from '@reyaxyz/common';
3
3
  import {
4
4
  GetWalletReferralDetailsParams,
5
5
  GetWalletReferralDetailsResult,
6
+ GetWalletReferralCodeParams,
7
+ GetWalletReferralCodeResult,
6
8
  } from './types';
7
9
 
8
10
  export default class LGEModule extends RestClient implements Loggable {
@@ -18,4 +20,10 @@ export default class LGEModule extends RestClient implements Loggable {
18
20
  const uri = `/api/xp/get-referral-profile/${params.address}`;
19
21
  return this.get<GetWalletReferralDetailsResult>(uri);
20
22
  }
23
+
24
+ @Logger('ReferralModule.getWalletReferralCode')
25
+ async getWalletReferralCode(params: GetWalletReferralCodeParams) {
26
+ const uri = `/api/xp/get-referral-code/${params.address}`;
27
+ return this.get<GetWalletReferralCodeResult>(uri);
28
+ }
21
29
  }
@@ -1,4 +1,6 @@
1
1
  export {
2
2
  GetWalletReferralDetailsParams,
3
3
  GetWalletReferralDetailsResult,
4
+ GetWalletReferralCodeParams,
5
+ GetWalletReferralCodeResult,
4
6
  } from '@reyaxyz/common';
@@ -26,13 +26,13 @@ export default class VoteModule extends RestClient implements Loggable {
26
26
  // READ
27
27
  @Logger('VoteModule.getVoteDetails')
28
28
  async getVoteDetails(params: GetVoteDetailsParams) {
29
- const uri = `/api/vote/${params.id}`;
29
+ const uri = `/api/vote/${params.slug}`;
30
30
  return this.get<GetVoteDetailsResult>(uri);
31
31
  }
32
32
 
33
33
  @Logger('VoteModule.getVoteStatus')
34
34
  async getVoteStatus(params: GetVoteStatusParams) {
35
- const uri = `/api/vote/${params.id}/user/${params.address}`;
35
+ const uri = `/api/vote/${params.slug}/user/${params.address}`;
36
36
  return this.get<GetVoteStatusResult>(uri);
37
37
  }
38
38
  }
@@ -6,24 +6,18 @@ export type VoteResult = {
6
6
  };
7
7
 
8
8
  export type GetVoteDetailsParams = {
9
- id: VoteDetailsEntity['id'];
10
- // TODO: Ioana make this required and remove id
11
- slug?: VoteDetailsEntity['slug'];
9
+ slug: VoteDetailsEntity['slug'];
12
10
  };
13
11
  export type GetVoteDetailsResult = VoteDetailsEntity;
14
12
 
15
13
  export type VoteParams = {
16
- id: VoteDetailsEntity['id'];
17
- // TODO: Ioana make this required and remove id
18
- slug?: VoteDetailsEntity['slug'];
14
+ slug: VoteDetailsEntity['slug'];
19
15
  voted: 'yes' | 'no';
20
16
  signer: Signer | JsonRpcSigner;
21
17
  };
22
18
 
23
19
  export type GetVoteStatusParams = {
24
20
  address: string;
25
- id: VoteDetailsEntity['id'];
26
- // TODO: Ioana make this required and remove id
27
- slug?: VoteDetailsEntity['slug'];
21
+ slug: VoteDetailsEntity['slug'];
28
22
  };
29
23
  export type GetVoteStatusResult = VoteStatusEntity;