@reyaxyz/common 0.285.0 → 0.286.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.
package/README.md CHANGED
@@ -6,5 +6,5 @@
6
6
 
7
7
  | Statements | Branches | Functions | Lines |
8
8
  | --------------------------- | ----------------------- | ------------------------- | ----------------- |
9
- | ![Statements](https://img.shields.io/badge/statements-19.61%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-16.6%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-9.85%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-21.15%25-red.svg?style=flat) |
9
+ | ![Statements](https://img.shields.io/badge/statements-19.73%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-16.27%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-9.81%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-21.3%25-red.svg?style=flat) |
10
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"incentives-api-types.js","sourceRoot":"/","sources":["incentives-api-types.ts"],"names":[],"mappings":"","sourcesContent":["import {\n AddressParam,\n ApiEndpoint,\n ApiInfiniteListEndpoint,\n ApiListEndpoint,\n PaginatedQueryParams,\n Stringified,\n} from './api-types';\nimport { Rank, RankTrading } from './types';\n\nexport type PointsBreakdown = {\n totalPoints: number;\n tradingPoints: number;\n stakingPoints: number;\n signalPoints: number;\n};\n\nexport type IncentivesUserPointsData = {\n weekly: PointsBreakdown;\n total: PointsBreakdown;\n};\n\nexport type IncentivesUserRanks = {\n walletAddress: string;\n tradingRank: RankTrading;\n stakingRank: Rank;\n};\n\nexport type IncentivesUserBoosts = {\n walletAddress: string;\n tradingBoost: number;\n stakingBoost: number;\n loyaltyBoost: number;\n};\n\nexport type IncentivesUserSummaryData = {\n walletAddress: string;\n points: IncentivesUserPointsData;\n ranks: Omit<IncentivesUserRanks, 'walletAddress'>;\n boosts: Omit<IncentivesUserBoosts, 'walletAddress'>;\n};\n\nexport type IncentivesLeaderBoardEntry = {\n rank: number;\n walletAddress: string;\n totalPoints: number;\n tradingPoints: number;\n stakingPoints: number;\n signalPoints: number;\n isCurrentUser?: boolean;\n};\n\nexport type IncentivesRankingHistoryEntry = {\n week: number;\n createdAt: Date;\n tradingRank: RankTrading;\n stakingRank: Rank;\n tradingPoints: number;\n stakingPoints: number;\n};\n\nexport type IncentivesPointsHistoryEntry = {\n createdAt: Date;\n tradingXp: number;\n stakingXp: number;\n totalXp: number;\n tradingPoints: number;\n stakingPoints: number;\n totalPoints: number;\n seasonNumber?: number;\n seasonName: string;\n sourceSystem?: string;\n};\n\nexport type IncentivesApiSource = {\n 'incentives/leaderBoard/:type': ApiInfiniteListEndpoint<\n IncentivesLeaderBoardEntry,\n { type: 'weekly' | 'total' },\n PaginatedQueryParams\n >;\n\n 'incentives/wallet/:address': ApiEndpoint<\n IncentivesUserSummaryData,\n AddressParam\n >;\n\n 'incentives/wallet/:address/leaderBoard/:type': ApiEndpoint<\n IncentivesLeaderBoardEntry,\n AddressParam & { type: 'weekly' | 'total' }\n >;\n\n 'incentives/wallet/:address/ranksHistory': ApiListEndpoint<\n IncentivesRankingHistoryEntry,\n AddressParam\n >;\n\n 'incentives/wallet/:address/pointsHistory': ApiListEndpoint<\n IncentivesPointsHistoryEntry,\n AddressParam\n >;\n};\n\nexport type IncentivesApi = {\n [K in keyof IncentivesApiSource]: {\n params: IncentivesApiSource[K]['params'];\n query: IncentivesApiSource[K]['query'];\n response: Stringified<IncentivesApiSource[K]['response']>;\n };\n};\n"]}
1
+ {"version":3,"file":"incentives-api-types.js","sourceRoot":"/","sources":["incentives-api-types.ts"],"names":[],"mappings":"","sourcesContent":["import {\n AddressParam,\n ApiEndpoint,\n ApiInfiniteListEndpoint,\n ApiListEndpoint,\n PaginatedQueryParams,\n Stringified,\n} from './api-types';\nimport { Rank, RankTrading } from './types';\n\nexport type PointsBreakdown = {\n totalPoints: number;\n tradingPoints: number;\n stakingPoints: number;\n signalPoints: number;\n};\n\nexport type IncentivesUserPointsData = {\n weekly: PointsBreakdown;\n total: PointsBreakdown;\n};\n\nexport type IncentivesUserRanks = {\n walletAddress: string;\n tradingRank: RankTrading;\n stakingRank: Rank;\n};\n\nexport type IncentivesUserBoosts = {\n walletAddress: string;\n tradingBoost: number;\n stakingBoost: number;\n loyaltyBoost: number;\n};\n\nexport type IncentivesUserSummaryData = {\n walletAddress: string;\n points: IncentivesUserPointsData;\n ranks: Omit<IncentivesUserRanks, 'walletAddress'>;\n boosts: Omit<IncentivesUserBoosts, 'walletAddress'>;\n};\n\nexport type IncentivesLeaderBoardEntry = {\n rank: number;\n walletAddress: string;\n totalPoints: number;\n tradingPoints: number;\n stakingPoints: number;\n signalPoints: number;\n isCurrentUser?: boolean;\n};\n\nexport type IncentivesRankingHistoryEntry = {\n week: number;\n createdAt: Date;\n tradingRank: RankTrading;\n stakingRank: Rank;\n tradingPoints: number;\n stakingPoints: number;\n};\n\nexport type IncentivesPointsHistoryEntry = {\n createdAt: Date;\n tradingXp: number;\n stakingXp: number;\n totalXp: number;\n tradingPoints: number;\n stakingPoints: number;\n totalPoints: number;\n seasonNumber?: number;\n seasonName: string;\n sourceSystem?: string;\n};\n\nexport type IncentivesApiSource = {\n 'incentives/points': ApiEndpoint<\n {\n total: number;\n weekly: number;\n },\n never\n >;\n\n 'incentives/leaderBoard/:type': ApiInfiniteListEndpoint<\n IncentivesLeaderBoardEntry,\n { type: 'weekly' | 'total' },\n PaginatedQueryParams\n >;\n\n 'incentives/wallet/:address': ApiEndpoint<\n IncentivesUserSummaryData,\n AddressParam\n >;\n\n 'incentives/wallet/:address/leaderBoard/:type': ApiEndpoint<\n IncentivesLeaderBoardEntry,\n AddressParam & { type: 'weekly' | 'total' }\n >;\n\n 'incentives/wallet/:address/ranksHistory': ApiListEndpoint<\n IncentivesRankingHistoryEntry,\n AddressParam\n >;\n\n 'incentives/wallet/:address/signalPoints': ApiListEndpoint<\n {\n createdAt: Date;\n points: number;\n reason: string;\n },\n AddressParam\n >;\n\n 'incentives/wallet/:address/pointsHistory': ApiListEndpoint<\n IncentivesPointsHistoryEntry,\n AddressParam\n >;\n};\n\nexport type IncentivesApi = {\n [K in keyof IncentivesApiSource]: {\n params: IncentivesApiSource[K]['params'];\n query: IncentivesApiSource[K]['query'];\n response: Stringified<IncentivesApiSource[K]['response']>;\n };\n};\n"]}
@@ -57,6 +57,10 @@ export type IncentivesPointsHistoryEntry = {
57
57
  sourceSystem?: string;
58
58
  };
59
59
  export type IncentivesApiSource = {
60
+ 'incentives/points': ApiEndpoint<{
61
+ total: number;
62
+ weekly: number;
63
+ }, never>;
60
64
  'incentives/leaderBoard/:type': ApiInfiniteListEndpoint<IncentivesLeaderBoardEntry, {
61
65
  type: 'weekly' | 'total';
62
66
  }, PaginatedQueryParams>;
@@ -65,6 +69,11 @@ export type IncentivesApiSource = {
65
69
  type: 'weekly' | 'total';
66
70
  }>;
67
71
  'incentives/wallet/:address/ranksHistory': ApiListEndpoint<IncentivesRankingHistoryEntry, AddressParam>;
72
+ 'incentives/wallet/:address/signalPoints': ApiListEndpoint<{
73
+ createdAt: Date;
74
+ points: number;
75
+ reason: string;
76
+ }, AddressParam>;
68
77
  'incentives/wallet/:address/pointsHistory': ApiListEndpoint<IncentivesPointsHistoryEntry, AddressParam>;
69
78
  };
70
79
  export type IncentivesApi = {
@@ -1 +1 @@
1
- {"version":3,"file":"incentives-api-types.d.ts","sourceRoot":"/","sources":["incentives-api-types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,WAAW,EACX,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACpB,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAA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BAA4B,EAC5B,YAAY,CACb,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;KACzB,CAAC,IAAI,MAAM,mBAAmB,GAAG;QAChC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QACzC,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QACvC,QAAQ,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;KAC3D;CACF,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './consts';
2
+ export * from './points';
2
3
  export * from './calculate';
3
4
  export * from './struct';
4
5
  export * from './cooldown-interval';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const getTradingBoostByTier: (tierId?: number) => 1 | 1.1 | 1.2;
2
+ //# sourceMappingURL=points.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"points.d.ts","sourceRoot":"/","sources":["utils/points.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,YAAa,MAAM,kBAO1C,CAAC"}
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./consts"), exports);
18
+ __exportStar(require("./points"), exports);
18
19
  __exportStar(require("./calculate"), exports);
19
20
  __exportStar(require("./struct"), exports);
20
21
  __exportStar(require("./cooldown-interval"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,sDAAoC;AACpC,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,0CAAwB;AACxB,iDAA+B;AAC/B,wDAAsC;AACtC,8CAA4B;AAC5B,gDAA8B","sourcesContent":["export * from './consts';\nexport * from './calculate';\nexport * from './struct';\nexport * from './cooldown-interval';\nexport * from './network';\nexport * from './number';\nexport * from './retry';\nexport * from './timestamp';\nexport * from './token';\nexport * from './task-wrapper';\nexport * from './whitelisted-wallets';\nexport * from './stringify';\nexport * from './sbt-helpers';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,sDAAoC;AACpC,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,0CAAwB;AACxB,iDAA+B;AAC/B,wDAAsC;AACtC,8CAA4B;AAC5B,gDAA8B","sourcesContent":["export * from './consts';\nexport * from './points';\nexport * from './calculate';\nexport * from './struct';\nexport * from './cooldown-interval';\nexport * from './network';\nexport * from './number';\nexport * from './retry';\nexport * from './timestamp';\nexport * from './token';\nexport * from './task-wrapper';\nexport * from './whitelisted-wallets';\nexport * from './stringify';\nexport * from './sbt-helpers';\n"]}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTradingBoostByTier = void 0;
4
+ var getTradingBoostByTier = function (tierId) {
5
+ return tierId === undefined
6
+ ? 1
7
+ : tierId === 0
8
+ ? 1.1
9
+ : [1, 2, 3].includes(tierId)
10
+ ? 1.2
11
+ : 1;
12
+ };
13
+ exports.getTradingBoostByTier = getTradingBoostByTier;
14
+ //# sourceMappingURL=points.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"points.js","sourceRoot":"/","sources":["utils/points.ts"],"names":[],"mappings":";;;AAAO,IAAM,qBAAqB,GAAG,UAAC,MAAe;IACnD,OAAA,MAAM,KAAK,SAAS;QAClB,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,MAAM,KAAK,CAAC;YACZ,CAAC,CAAC,GAAG;YACL,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAC1B,CAAC,CAAC,GAAG;gBACL,CAAC,CAAC,CAAC;AANT,CAMS,CAAC;AAPC,QAAA,qBAAqB,yBAOtB","sourcesContent":["export const getTradingBoostByTier = (tierId?: number) =>\n tierId === undefined\n ? 1\n : tierId === 0\n ? 1.1\n : [1, 2, 3].includes(tierId)\n ? 1.2\n : 1;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reyaxyz/common",
3
- "version": "0.285.0",
3
+ "version": "0.286.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -44,5 +44,5 @@
44
44
  "generate:coverage-badges": "npx istanbul-badges-readme --silent"
45
45
  },
46
46
  "packageManager": "pnpm@8.3.1",
47
- "gitHead": "b4fd5dc6d32b51810f53bcdab4be016f715192fd"
47
+ "gitHead": "aa42c36515fc94d487cda68beea3d9917aca36c0"
48
48
  }
@@ -73,6 +73,14 @@ export type IncentivesPointsHistoryEntry = {
73
73
  };
74
74
 
75
75
  export type IncentivesApiSource = {
76
+ 'incentives/points': ApiEndpoint<
77
+ {
78
+ total: number;
79
+ weekly: number;
80
+ },
81
+ never
82
+ >;
83
+
76
84
  'incentives/leaderBoard/:type': ApiInfiniteListEndpoint<
77
85
  IncentivesLeaderBoardEntry,
78
86
  { type: 'weekly' | 'total' },
@@ -94,6 +102,15 @@ export type IncentivesApiSource = {
94
102
  AddressParam
95
103
  >;
96
104
 
105
+ 'incentives/wallet/:address/signalPoints': ApiListEndpoint<
106
+ {
107
+ createdAt: Date;
108
+ points: number;
109
+ reason: string;
110
+ },
111
+ AddressParam
112
+ >;
113
+
97
114
  'incentives/wallet/:address/pointsHistory': ApiListEndpoint<
98
115
  IncentivesPointsHistoryEntry,
99
116
  AddressParam
@@ -1,4 +1,5 @@
1
1
  export * from './consts';
2
+ export * from './points';
2
3
  export * from './calculate';
3
4
  export * from './struct';
4
5
  export * from './cooldown-interval';
@@ -0,0 +1,8 @@
1
+ export const getTradingBoostByTier = (tierId?: number) =>
2
+ tierId === undefined
3
+ ? 1
4
+ : tierId === 0
5
+ ? 1.1
6
+ : [1, 2, 3].includes(tierId)
7
+ ? 1.2
8
+ : 1;