@heliofi/launchpad-common 1.6.51 → 1.6.52
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/src/domain/model/wallet-points/constants.d.ts +21 -0
- package/dist/src/domain/model/wallet-points/constants.js +37 -0
- package/dist/src/domain/model/wallet-points/constants.js.map +1 -0
- package/dist/src/domain/model/wallet-points/dtos/GetWalletRewards.dto.d.ts +3 -0
- package/dist/src/domain/model/wallet-points/dtos/{WalletPoints.dto.js → GetWalletRewards.dto.js} +5 -5
- package/dist/src/domain/model/wallet-points/dtos/GetWalletRewards.dto.js.map +1 -0
- package/dist/src/domain/model/wallet-points/dtos/RewardBadge.dto.d.ts +6 -0
- package/dist/src/domain/model/wallet-points/dtos/RewardBadge.dto.js +7 -0
- package/dist/src/domain/model/wallet-points/dtos/RewardBadge.dto.js.map +1 -0
- package/dist/src/domain/model/wallet-points/dtos/TxRewardsRequest.dto.d.ts +8 -0
- package/dist/src/domain/model/{hero-token/dtos/HeroTokenQuery.dto.js → wallet-points/dtos/TxRewardsRequest.dto.js} +24 -9
- package/dist/src/domain/model/wallet-points/dtos/TxRewardsRequest.dto.js.map +1 -0
- package/dist/src/domain/model/wallet-points/entities/Multiplier.entity.d.ts +5 -0
- package/dist/src/domain/model/wallet-points/entities/Multiplier.entity.js +7 -0
- package/dist/src/domain/model/wallet-points/entities/Multiplier.entity.js.map +1 -0
- package/dist/src/domain/model/wallet-points/entities/TxRewardsResponse.entity.d.ts +6 -0
- package/dist/src/domain/model/wallet-points/entities/TxRewardsResponse.entity.js +7 -0
- package/dist/src/domain/model/wallet-points/entities/TxRewardsResponse.entity.js.map +1 -0
- package/dist/src/domain/model/wallet-points/entities/WalletRewards.entity.d.ts +8 -0
- package/dist/src/domain/model/wallet-points/entities/WalletRewards.entity.js +7 -0
- package/dist/src/domain/model/wallet-points/entities/WalletRewards.entity.js.map +1 -0
- package/dist/src/domain/model/wallet-points/index.d.ts +6 -2
- package/dist/src/domain/model/wallet-points/index.js +6 -2
- package/dist/src/domain/model/wallet-points/index.js.map +1 -1
- package/dist/src/utils/dates.d.ts +1 -0
- package/dist/src/utils/dates.js +13 -0
- package/dist/src/utils/dates.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/src/domain/model/hero-token/dtos/HeroTokenQuery.dto.d.ts +0 -4
- package/dist/src/domain/model/hero-token/dtos/HeroTokenQuery.dto.js.map +0 -1
- package/dist/src/domain/model/hero-token/dtos/HeroTopTokensQuery.dto.d.ts +0 -4
- package/dist/src/domain/model/hero-token/dtos/HeroTopTokensQuery.dto.js +0 -23
- package/dist/src/domain/model/hero-token/dtos/HeroTopTokensQuery.dto.js.map +0 -1
- package/dist/src/domain/model/wallet-points/dtos/WalletPoints.dto.d.ts +0 -3
- package/dist/src/domain/model/wallet-points/dtos/WalletPoints.dto.js.map +0 -1
- package/dist/src/domain/model/wallet-points/entities/WalletPoints.entity.d.ts +0 -5
- package/dist/src/domain/model/wallet-points/entities/WalletPoints.entity.js +0 -8
- package/dist/src/domain/model/wallet-points/entities/WalletPoints.entity.js.map +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare enum RewardsTxType {
|
|
2
|
+
TRADE = "TRADE",
|
|
3
|
+
MINT = "MINT",
|
|
4
|
+
GRADUATE = "GRADUATE"
|
|
5
|
+
}
|
|
6
|
+
export declare enum MultiplierType {
|
|
7
|
+
CURRENT = "CURRENT",
|
|
8
|
+
STREAK = "STREAK",
|
|
9
|
+
RANDOM = "RANDOM",
|
|
10
|
+
MINT = "MINT",
|
|
11
|
+
GRADUATE = "GRADUATE"
|
|
12
|
+
}
|
|
13
|
+
export declare const StreakMultipliers: Record<number, number>;
|
|
14
|
+
export declare const getStreakMultiplier: (streakDays: number) => number;
|
|
15
|
+
export declare enum BadgeType {
|
|
16
|
+
MINTER = "MINTER",
|
|
17
|
+
GRADUATOR = "GRADUATOR",
|
|
18
|
+
BRONZE = "BRONZE",
|
|
19
|
+
SILVER = "SILVER",
|
|
20
|
+
GOLD = "GOLD"
|
|
21
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BadgeType = exports.getStreakMultiplier = exports.StreakMultipliers = exports.MultiplierType = exports.RewardsTxType = void 0;
|
|
4
|
+
var RewardsTxType;
|
|
5
|
+
(function (RewardsTxType) {
|
|
6
|
+
RewardsTxType["TRADE"] = "TRADE";
|
|
7
|
+
RewardsTxType["MINT"] = "MINT";
|
|
8
|
+
RewardsTxType["GRADUATE"] = "GRADUATE";
|
|
9
|
+
})(RewardsTxType = exports.RewardsTxType || (exports.RewardsTxType = {}));
|
|
10
|
+
var MultiplierType;
|
|
11
|
+
(function (MultiplierType) {
|
|
12
|
+
MultiplierType["CURRENT"] = "CURRENT";
|
|
13
|
+
MultiplierType["STREAK"] = "STREAK";
|
|
14
|
+
MultiplierType["RANDOM"] = "RANDOM";
|
|
15
|
+
MultiplierType["MINT"] = "MINT";
|
|
16
|
+
MultiplierType["GRADUATE"] = "GRADUATE";
|
|
17
|
+
})(MultiplierType = exports.MultiplierType || (exports.MultiplierType = {}));
|
|
18
|
+
exports.StreakMultipliers = {
|
|
19
|
+
1: 1.0,
|
|
20
|
+
2: 1.2,
|
|
21
|
+
3: 1.5,
|
|
22
|
+
4: 2.0,
|
|
23
|
+
5: 3.0,
|
|
24
|
+
};
|
|
25
|
+
const getStreakMultiplier = (streakDays) => {
|
|
26
|
+
return exports.StreakMultipliers[Math.min(streakDays, 5)] || 1.0;
|
|
27
|
+
};
|
|
28
|
+
exports.getStreakMultiplier = getStreakMultiplier;
|
|
29
|
+
var BadgeType;
|
|
30
|
+
(function (BadgeType) {
|
|
31
|
+
BadgeType["MINTER"] = "MINTER";
|
|
32
|
+
BadgeType["GRADUATOR"] = "GRADUATOR";
|
|
33
|
+
BadgeType["BRONZE"] = "BRONZE";
|
|
34
|
+
BadgeType["SILVER"] = "SILVER";
|
|
35
|
+
BadgeType["GOLD"] = "GOLD";
|
|
36
|
+
})(BadgeType = exports.BadgeType || (exports.BadgeType = {}));
|
|
37
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/domain/model/wallet-points/constants.ts"],"names":[],"mappings":";;;AAEA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,gCAAe,CAAA;IACf,8BAAa,CAAA;IACb,sCAAqB,CAAA;AACvB,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB;AAED,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;IACb,uCAAqB,CAAA;AACvB,CAAC,EANW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAMzB;AAGY,QAAA,iBAAiB,GAA2B;IACvD,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;CACP,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,UAAkB,EAAU,EAAE;IAChE,OAAO,yBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;AAC3D,CAAC,CAAC;AAFW,QAAA,mBAAmB,uBAE9B;AAEF,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,8BAAiB,CAAA;IACjB,oCAAuB,CAAA;IACvB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;IACjB,0BAAa,CAAA;AACf,CAAC,EANW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAMpB"}
|
package/dist/src/domain/model/wallet-points/dtos/{WalletPoints.dto.js → GetWalletRewards.dto.js}
RENAMED
|
@@ -9,14 +9,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.GetWalletRewardsRequest = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
-
class
|
|
14
|
+
class GetWalletRewardsRequest {
|
|
15
15
|
}
|
|
16
16
|
__decorate([
|
|
17
17
|
(0, class_validator_1.IsString)(),
|
|
18
18
|
(0, class_validator_1.IsNotEmpty)(),
|
|
19
19
|
__metadata("design:type", String)
|
|
20
|
-
],
|
|
21
|
-
exports.
|
|
22
|
-
//# sourceMappingURL=
|
|
20
|
+
], GetWalletRewardsRequest.prototype, "walletAddress", void 0);
|
|
21
|
+
exports.GetWalletRewardsRequest = GetWalletRewardsRequest;
|
|
22
|
+
//# sourceMappingURL=GetWalletRewards.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetWalletRewards.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/wallet-points/dtos/GetWalletRewards.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AAEvD,MAAa,uBAAuB;CAInC;AAHC;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8DACQ;AAHvB,0DAIC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RewardBadge.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/wallet-points/dtos/RewardBadge.dto.ts"],"names":[],"mappings":";;;AAGA,MAAa,WAAW;CAIvB;AAJD,kCAIC"}
|
|
@@ -9,18 +9,33 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.GetTxRewardsRequest = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const constants_1 = require("../../../constants");
|
|
15
|
-
class
|
|
16
|
-
constructor() {
|
|
17
|
-
this.blockchainSymbol = constants_1.BlockchainSymbol.SOL;
|
|
18
|
-
}
|
|
15
|
+
class GetTxRewardsRequest {
|
|
19
16
|
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsEnum)(constants_1.TxType),
|
|
19
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], GetTxRewardsRequest.prototype, "transactionType", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], GetTxRewardsRequest.prototype, "blockchain", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], GetTxRewardsRequest.prototype, "usdQuoteTokenAmount", void 0);
|
|
20
31
|
__decorate([
|
|
21
32
|
(0, class_validator_1.IsString)(),
|
|
22
|
-
(0, class_validator_1.
|
|
33
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
23
34
|
__metadata("design:type", String)
|
|
24
|
-
],
|
|
25
|
-
|
|
26
|
-
|
|
35
|
+
], GetTxRewardsRequest.prototype, "walletAddress", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsBoolean)(),
|
|
38
|
+
__metadata("design:type", Boolean)
|
|
39
|
+
], GetTxRewardsRequest.prototype, "isSimulated", void 0);
|
|
40
|
+
exports.GetTxRewardsRequest = GetTxRewardsRequest;
|
|
41
|
+
//# sourceMappingURL=TxRewardsRequest.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TxRewardsRequest.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/wallet-points/dtos/TxRewardsRequest.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA0E;AAC1E,kDAA4C;AAE5C,MAAa,mBAAmB;CAkB/B;AAjBC;IAAC,IAAA,wBAAM,EAAC,kBAAM,CAAC;IACd,IAAA,4BAAU,GAAE;;4DACW;AAExB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uDACM;AAEnB;IAAC,IAAA,4BAAU,GAAE;;gEACe;AAE5B;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACS;AAEtB;IAAC,IAAA,2BAAS,GAAE;;wDACS;AAjBvB,kDAkBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Multiplier.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/wallet-points/entities/Multiplier.entity.ts"],"names":[],"mappings":";;;AAEA,MAAa,UAAU;CAItB;AAJD,gCAIC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TxRewardsResponse.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/wallet-points/entities/TxRewardsResponse.entity.ts"],"names":[],"mappings":";;;AAEA,MAAa,iBAAiB;CAM7B;AAND,8CAMC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletRewards.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/wallet-points/entities/WalletRewards.entity.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;CAUzB;AAVD,sCAUC"}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export * from './entities/
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './entities/WalletRewards.entity';
|
|
2
|
+
export * from './entities/Multiplier.entity';
|
|
3
|
+
export * from './entities/TxRewardsResponse.entity';
|
|
4
|
+
export * from './dtos/TxRewardsRequest.dto';
|
|
5
|
+
export * from './dtos/RewardBadge.dto';
|
|
6
|
+
export * from './constants';
|
|
@@ -14,6 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./entities/
|
|
18
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./entities/WalletRewards.entity"), exports);
|
|
18
|
+
__exportStar(require("./entities/Multiplier.entity"), exports);
|
|
19
|
+
__exportStar(require("./entities/TxRewardsResponse.entity"), exports);
|
|
20
|
+
__exportStar(require("./dtos/TxRewardsRequest.dto"), exports);
|
|
21
|
+
__exportStar(require("./dtos/RewardBadge.dto"), exports);
|
|
22
|
+
__exportStar(require("./constants"), exports);
|
|
19
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/domain/model/wallet-points/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/domain/model/wallet-points/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,+DAA6C;AAC7C,sEAAoD;AACpD,8DAA4C;AAC5C,yDAAuC;AACvC,8CAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isYesterday(date?: Date): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isYesterday = void 0;
|
|
4
|
+
function isYesterday(date) {
|
|
5
|
+
if (!date) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
const yesterday = new Date();
|
|
9
|
+
yesterday.setDate(yesterday.getDate() - 1);
|
|
10
|
+
return date.toDateString() === yesterday.toDateString();
|
|
11
|
+
}
|
|
12
|
+
exports.isYesterday = isYesterday;
|
|
13
|
+
//# sourceMappingURL=dates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dates.js","sourceRoot":"","sources":["../../../src/utils/dates.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAC,IAAW;IACrC,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,KAAK,CAAC;KACd;IAED,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;IAC3C,OAAO,IAAI,CAAC,YAAY,EAAE,KAAK,SAAS,CAAC,YAAY,EAAE,CAAC;AAC1D,CAAC;AARD,kCAQC"}
|