@reyaxyz/community-sdk 0.17.7 → 0.17.9
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.
- package/dist/modules/index.js +4 -0
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/lge/index.js.map +1 -1
- package/dist/modules/twitter/index.js.map +1 -1
- package/dist/types/modules/lge/index.d.ts +2 -2
- package/dist/types/modules/lge/index.d.ts.map +1 -1
- package/dist/types/modules/twitter/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/modules/index.ts +5 -0
- package/src/modules/lge/index.ts +6 -0
- package/src/modules/twitter/index.ts +3 -0
package/dist/modules/index.js
CHANGED
|
@@ -17,4 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./vote"), exports);
|
|
18
18
|
__exportStar(require("./lge"), exports);
|
|
19
19
|
__exportStar(require("./twitter"), exports);
|
|
20
|
+
// TODO: Filip, Antonio add new Module for Referrals
|
|
21
|
+
// There add a function that:
|
|
22
|
+
// return { referralLink: string, totalReferralsCount: number, totalReferralXP: number }
|
|
23
|
+
// params: address
|
|
20
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,wCAAsB;AACtB,4CAA0B","sourcesContent":["export * from './vote';\nexport * from './lge';\nexport * from './twitter';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,wCAAsB;AACtB,4CAA0B;AAE1B,oDAAoD;AACpD,6BAA6B;AAC7B,wFAAwF;AACxF,kBAAkB","sourcesContent":["export * from './vote';\nexport * from './lge';\nexport * from './twitter';\n\n// TODO: Filip, Antonio add new Module for Referrals\n// There add a function that:\n// return { referralLink: string, totalReferralsCount: number, totalReferralXP: number }\n// params: address\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/lge/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAMyB;AASzB,0CAAmD;AAEnD;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;IAIK,mCAAe,GAAf,UAAgB,CAAwB;;;;gBACtC,GAAG,GAAG,kBAAkB,CAAC;gBAC/B,sBAAO,IAAI,CAAC,GAAG,CAAwB,GAAG,CAAC,EAAC;;;KAC7C;IAGK,uCAAmB,GAAnB,UAAoB,MAAiC;;;;gBACnD,GAAG,GAAG,6BAAsB,MAAM,CAAC,OAAO,CAAE,CAAC;gBACnD,sBAAO,IAAI,CAAC,GAAG,CAA4B,GAAG,CAAC,EAAC;;;KACjD;IAGK,kCAAc,GAAd,UAAe,MAA4B;;;;gBACzC,GAAG,GAAG,8BAAuB,MAAM,CAAC,OAAO,cAAI,MAAM,CAAC,IAAI,CAAE,CAAC;gBACnE,sBAAO,IAAI,CAAC,GAAG,CAAuB,GAAG,CAAC,EAAC;;;KAC5C;IAGK,0CAAsB,GAAtB,UAAuB,MAAoC;;;;gBACzD,GAAG,GAAG,wCAAiC,MAAM,CAAC,OAAO,CAAE,CAAC;gBAC9D,sBAAO,IAAI,CAAC,GAAG,CAA+B,GAAG,CAAC,EAAC;;;KACpD;IArBK;QAFL,IAAA,eAAM,EAAC,2BAA2B,CAAC;QACpC,6DAA6D;oDAI5D;IAGK;QADL,IAAA,eAAM,EAAC,+BAA+B,CAAC;wDAIvC;IAGK;QADL,IAAA,eAAM,EAAC,0BAA0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AA0B,CAAC;mDAIlC;IAGK;QADL,IAAA,eAAM,EAAC,kCAAkC,CAAC;2DAI1C;IAOH,gBAAC;CAAA,AAtCD,CAAuC,mBAAU,GAsChD;kBAtCoB,SAAS","sourcesContent":["import {\n GetLeaderboardParams,\n GetLeaderboardResult,\n GetUserLeaderboardDataParams,\n GetUserLeaderboardDataResult,\n RestClient,\n} from '@reyaxyz/common';\n\nimport {\n GetAccountLGEStatusParams,\n GetAccountLGEStatusResult,\n GetLGEBoostRateParams,\n GetLGEBoostRateResult,\n} from './types';\n\nimport { Loggable, Logger } from '@reyaxyz/common';\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.getLGEBoostRate')\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async getLGEBoostRate(_: GetLGEBoostRateParams) {\n const uri = `/api/xp/lp-boost`;\n return this.get<GetLGEBoostRateResult>(uri);\n }\n\n @Logger('LGEModule.getAccountLGEStatus')\n async getAccountLGEStatus(params: GetAccountLGEStatusParams) {\n const uri = `/api/xp/lp-profile/${params.address}`;\n return this.get<GetAccountLGEStatusResult>(uri);\n }\n\n @Logger('LGEModule.getLeaderboard')\n async getLeaderboard(params: GetLeaderboardParams) {\n const uri = `/api/xp/leaderboard/${params.perPage}/${params.page}`;\n return this.get<GetLeaderboardResult>(uri);\n }\n\n @Logger('LGEModule.getUserLeaderboardData')\n async getUserLeaderboardData(params: GetUserLeaderboardDataParams) {\n const uri = `/api/xp/leaderboard-user-data/${params.address}`;\n return this.get<GetUserLeaderboardDataResult>(uri);\n }\n\n // TODO: Filip, Antonio add function that returns gameStatus for user\n // return { bodyId:string, status: 'notStarted' | 'notLockedIn' | 'lockedIn', boostRate: number, nextBoostStartTimestampMilliseconds: number }\n\n // TODO: Filip, Antonio add function that triggers new random boost for user, we just pass address BE should persist and return this number to UI\n // params: { bodyId:string } and return { boostRate: number, bodyId: string }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/twitter/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,uCAA0E;AAC1E,0CAAmD;AAEnD;IAKE,uBACE,WAAmB,EACnB,eAAuB,EACvB,cAAuB;QALzB,mBAAc,GAAY,KAAK,CAAC;QAO9B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAGD,0CAAkB,GAAlB,UACE,MAAuD;QAEvD,OAAO,IAAA,6BAAkB,wBACpB,MAAM,KACT,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,eAAe,EAAE,IAAI,CAAC,eAAe,IACrC,CAAC;IACL,CAAC;IARD;QADC,IAAA,eAAM,EAAC,kCAAkC,CAAC;2DAS1C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/twitter/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,uCAA0E;AAC1E,0CAAmD;AAEnD;IAKE,uBACE,WAAmB,EACnB,eAAuB,EACvB,cAAuB;QALzB,mBAAc,GAAY,KAAK,CAAC;QAO9B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAGD,0CAAkB,GAAlB,UACE,MAAuD;QAEvD,OAAO,IAAA,6BAAkB,wBACpB,MAAM,KACT,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,eAAe,EAAE,IAAI,CAAC,eAAe,IACrC,CAAC;IACL,CAAC;IARD;QADC,IAAA,eAAM,EAAC,kCAAkC,CAAC;2DAS1C;IAIH,oBAAC;CAAA,AA5BD,IA4BC;kBA5BoB,aAAa","sourcesContent":["import { getTwitterOauthUrl, GetTwitterOauthUrlParams } from './services';\nimport { Loggable, Logger } from '@reyaxyz/common';\n\nexport default class TwitterModule implements Loggable {\n private redirectURI: string;\n private twitterClientId: string;\n loggingEnabled: boolean = false;\n\n constructor(\n redirectURI: string,\n twitterClientId: string,\n loggingEnabled: boolean,\n ) {\n this.redirectURI = redirectURI;\n this.twitterClientId = twitterClientId;\n this.loggingEnabled = loggingEnabled;\n }\n\n @Logger('TwitterModule.getTwitterOauthUrl')\n getTwitterOauthUrl(\n params: Pick<GetTwitterOauthUrlParams, 'walletAddress'>,\n ): string {\n return getTwitterOauthUrl({\n ...params,\n redirectURI: this.redirectURI,\n twitterClientId: this.twitterClientId,\n });\n }\n\n // TODO: Filip, Antonio add twitter function to TwitterModule that triggers boost lockin for game flow\n // TODO: Filip, Antonio add twitter function to TwitterModule that triggers share referral\n}\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { GetLeaderboardParams, GetLeaderboardResult, GetUserLeaderboardDataParams, RestClient } from '@reyaxyz/common';
|
|
2
|
-
import { GetAccountLGEStatusParams, GetAccountLGEStatusResult, GetLGEBoostRateParams } from './types';
|
|
2
|
+
import { GetAccountLGEStatusParams, GetAccountLGEStatusResult, GetLGEBoostRateParams, GetLGEBoostRateResult } from './types';
|
|
3
3
|
import { Loggable } from '@reyaxyz/common';
|
|
4
4
|
export default class LGEModule extends RestClient implements Loggable {
|
|
5
5
|
loggingEnabled: boolean;
|
|
6
6
|
constructor(apiUrl: string, loggingEnabled: boolean);
|
|
7
|
-
getLGEBoostRate(_: GetLGEBoostRateParams): Promise<
|
|
7
|
+
getLGEBoostRate(_: GetLGEBoostRateParams): Promise<GetLGEBoostRateResult>;
|
|
8
8
|
getAccountLGEStatus(params: GetAccountLGEStatusParams): Promise<GetAccountLGEStatusResult>;
|
|
9
9
|
getLeaderboard(params: GetLeaderboardParams): Promise<GetLeaderboardResult>;
|
|
10
10
|
getUserLeaderboardData(params: GetUserLeaderboardDataParams): Promise<import("@reyaxyz/common").UserLeaderboardDataEntity>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/lge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,4BAA4B,EAE5B,UAAU,EACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/lge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,4BAA4B,EAE5B,UAAU,EACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,QAAQ,EAAU,MAAM,iBAAiB,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,UAAW,YAAW,QAAQ;IACnE,cAAc,EAAE,OAAO,CAAS;gBAEpB,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO;IAO7C,eAAe,CAAC,CAAC,EAAE,qBAAqB;IAMxC,mBAAmB,CAAC,MAAM,EAAE,yBAAyB;IAMrD,cAAc,CAAC,MAAM,EAAE,oBAAoB;IAM3C,sBAAsB,CAAC,MAAM,EAAE,4BAA4B;CAUlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/twitter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAU,MAAM,iBAAiB,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,aAAc,YAAW,QAAQ;IACpD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,eAAe,CAAS;IAChC,cAAc,EAAE,OAAO,CAAS;gBAG9B,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,EACvB,cAAc,EAAE,OAAO;IAQzB,kBAAkB,CAChB,MAAM,EAAE,IAAI,CAAC,wBAAwB,EAAE,eAAe,CAAC,GACtD,MAAM;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/twitter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAU,MAAM,iBAAiB,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,aAAc,YAAW,QAAQ;IACpD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,eAAe,CAAS;IAChC,cAAc,EAAE,OAAO,CAAS;gBAG9B,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,EACvB,cAAc,EAAE,OAAO;IAQzB,kBAAkB,CAChB,MAAM,EAAE,IAAI,CAAC,wBAAwB,EAAE,eAAe,CAAC,GACtD,MAAM;CAUV"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reyaxyz/community-sdk",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.9",
|
|
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.
|
|
14
|
-
"@reyaxyz/sdk": "0.48.
|
|
13
|
+
"@reyaxyz/common": "0.56.1",
|
|
14
|
+
"@reyaxyz/sdk": "0.48.3",
|
|
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.10.4",
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "4d4c3ecb9c3a66bfe128ba4e96c8922d4259a42c"
|
|
42
42
|
}
|
package/src/modules/index.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
export * from './vote';
|
|
2
2
|
export * from './lge';
|
|
3
3
|
export * from './twitter';
|
|
4
|
+
|
|
5
|
+
// TODO: Filip, Antonio add new Module for Referrals
|
|
6
|
+
// There add a function that:
|
|
7
|
+
// return { referralLink: string, totalReferralsCount: number, totalReferralXP: number }
|
|
8
|
+
// params: address
|
package/src/modules/lge/index.ts
CHANGED
|
@@ -47,4 +47,10 @@ export default class LGEModule extends RestClient implements Loggable {
|
|
|
47
47
|
const uri = `/api/xp/leaderboard-user-data/${params.address}`;
|
|
48
48
|
return this.get<GetUserLeaderboardDataResult>(uri);
|
|
49
49
|
}
|
|
50
|
+
|
|
51
|
+
// TODO: Filip, Antonio add function that returns gameStatus for user
|
|
52
|
+
// return { bodyId:string, status: 'notStarted' | 'notLockedIn' | 'lockedIn', boostRate: number, nextBoostStartTimestampMilliseconds: number }
|
|
53
|
+
|
|
54
|
+
// TODO: Filip, Antonio add function that triggers new random boost for user, we just pass address BE should persist and return this number to UI
|
|
55
|
+
// params: { bodyId:string } and return { boostRate: number, bodyId: string }
|
|
50
56
|
}
|
|
@@ -26,4 +26,7 @@ export default class TwitterModule implements Loggable {
|
|
|
26
26
|
twitterClientId: this.twitterClientId,
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
+
|
|
30
|
+
// TODO: Filip, Antonio add twitter function to TwitterModule that triggers boost lockin for game flow
|
|
31
|
+
// TODO: Filip, Antonio add twitter function to TwitterModule that triggers share referral
|
|
29
32
|
}
|