@reyaxyz/community-sdk 0.6.4 → 0.7.1
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/lge/services/get-account-lge-status/index.js +6 -1
- package/dist/modules/lge/services/get-account-lge-status/index.js.map +1 -1
- package/dist/modules/lge/services/get-account-lge-status/types.js.map +1 -1
- package/dist/types/modules/lge/services/get-account-lge-status/index.d.ts.map +1 -1
- package/dist/types/modules/lge/services/get-account-lge-status/types.d.ts +7 -1
- package/dist/types/modules/lge/services/get-account-lge-status/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/modules/lge/services/get-account-lge-status/index.ts +6 -1
- package/src/modules/lge/services/get-account-lge-status/types.ts +8 -1
|
@@ -37,11 +37,16 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getAccountLGEStatus = void 0;
|
|
40
|
+
// TODO: Costin write proper logic here
|
|
40
41
|
function mockAccountLGEStatus() {
|
|
41
42
|
return {
|
|
42
43
|
currentBoost: Math.random() * 100,
|
|
43
44
|
deposited: Math.floor(Math.random() * 10000) + 1000,
|
|
44
|
-
xp:
|
|
45
|
+
xp: {
|
|
46
|
+
value: Math.floor(Math.random() * 100) + 1000,
|
|
47
|
+
valueTimestampMilliseconds: Date.now().valueOf() - 1000 * 5,
|
|
48
|
+
rate: 0.03,
|
|
49
|
+
},
|
|
45
50
|
};
|
|
46
51
|
}
|
|
47
52
|
// TODO: Write proper implementation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/lge/services/get-account-lge-status/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,oBAAoB;IAC3B,OAAO;QACL,YAAY,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG;QACjC,SA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CAAC,CAAC,EAAA;oBAXF,sBAAO,SAWL,EAAC;;;KACJ,CAAC;AAhBW,QAAA,mBAAmB,uBAgB9B","sourcesContent":["import { GetAccountLGEStatusParams, GetAccountLGEStatusResult } from './types';\n\n// TODO: Costin write proper logic here\nfunction mockAccountLGEStatus(): GetAccountLGEStatusResult {\n return {\n currentBoost: Math.random() * 100,\n deposited: Math.floor(Math.random() * 10000) + 1000,\n xp: {\n value: Math.floor(Math.random() * 100) + 1000,\n valueTimestampMilliseconds: Date.now().valueOf() - 1000 * 5,\n rate: 0.03,\n },\n };\n}\n\n// TODO: Write proper implementation\nexport const getAccountLGEStatus = async (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _: GetAccountLGEStatusParams,\n): Promise<GetAccountLGEStatusResult> => {\n return await new Promise((resolve, reject) => {\n setTimeout(\n () => {\n const error = Math.random() * 100 > 50;\n if (error) {\n reject(new Error('getAccountLGEStatus error'));\n }\n resolve(mockAccountLGEStatus());\n },\n Math.random() * 100 + 1000,\n );\n });\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"/","sources":["modules/lge/services/get-account-lge-status/types.ts"],"names":[],"mappings":"","sourcesContent":["export type GetAccountLGEStatusParams = {\n address: string; // wallet address\n};\nexport type GetAccountLGEStatusResult = {\n xp:
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"/","sources":["modules/lge/services/get-account-lge-status/types.ts"],"names":[],"mappings":"","sourcesContent":["export type GetAccountLGEStatusParams = {\n address: string; // wallet address\n};\n\ntype XPEntity = {\n value: number;\n valueTimestampMilliseconds: number;\n rate: number;\n};\n\nexport type GetAccountLGEStatusResult = {\n xp: XPEntity;\n currentBoost: number;\n deposited: number;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/lge/services/get-account-lge-status/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/lge/services/get-account-lge-status/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAgB/E,eAAO,MAAM,mBAAmB,MAE3B,yBAAyB,KAC3B,QAAQ,yBAAyB,CAanC,CAAC"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
export type GetAccountLGEStatusParams = {
|
|
2
2
|
address: string;
|
|
3
3
|
};
|
|
4
|
+
type XPEntity = {
|
|
5
|
+
value: number;
|
|
6
|
+
valueTimestampMilliseconds: number;
|
|
7
|
+
rate: number;
|
|
8
|
+
};
|
|
4
9
|
export type GetAccountLGEStatusResult = {
|
|
5
|
-
xp:
|
|
10
|
+
xp: XPEntity;
|
|
6
11
|
currentBoost: number;
|
|
7
12
|
deposited: number;
|
|
8
13
|
};
|
|
14
|
+
export {};
|
|
9
15
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["modules/lge/services/get-account-lge-status/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["modules/lge/services/get-account-lge-status/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,KAAK,EAAE,MAAM,CAAC;IACd,0BAA0B,EAAE,MAAM,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,QAAQ,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reyaxyz/community-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
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.29.
|
|
13
|
+
"@reyaxyz/common": "0.35.0",
|
|
14
|
+
"@reyaxyz/sdk": "0.29.1",
|
|
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": "261083225082dad2d3a81c61df0516b692f0758e"
|
|
42
42
|
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { GetAccountLGEStatusParams, GetAccountLGEStatusResult } from './types';
|
|
2
2
|
|
|
3
|
+
// TODO: Costin write proper logic here
|
|
3
4
|
function mockAccountLGEStatus(): GetAccountLGEStatusResult {
|
|
4
5
|
return {
|
|
5
6
|
currentBoost: Math.random() * 100,
|
|
6
7
|
deposited: Math.floor(Math.random() * 10000) + 1000,
|
|
7
|
-
xp:
|
|
8
|
+
xp: {
|
|
9
|
+
value: Math.floor(Math.random() * 100) + 1000,
|
|
10
|
+
valueTimestampMilliseconds: Date.now().valueOf() - 1000 * 5,
|
|
11
|
+
rate: 0.03,
|
|
12
|
+
},
|
|
8
13
|
};
|
|
9
14
|
}
|
|
10
15
|
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
export type GetAccountLGEStatusParams = {
|
|
2
2
|
address: string; // wallet address
|
|
3
3
|
};
|
|
4
|
+
|
|
5
|
+
type XPEntity = {
|
|
6
|
+
value: number;
|
|
7
|
+
valueTimestampMilliseconds: number;
|
|
8
|
+
rate: number;
|
|
9
|
+
};
|
|
10
|
+
|
|
4
11
|
export type GetAccountLGEStatusResult = {
|
|
5
|
-
xp:
|
|
12
|
+
xp: XPEntity;
|
|
6
13
|
currentBoost: number;
|
|
7
14
|
deposited: number;
|
|
8
15
|
};
|