@heliofi/launchpad-common 1.6.46 → 1.6.47-alpha.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/src/domain/model/wallet-points/constants.d.ts +18 -0
- package/dist/src/domain/model/wallet-points/constants.js +34 -0
- package/dist/src/domain/model/wallet-points/constants.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/wallet-points/dtos/TxRewardsRequest.dto.js +41 -0
- 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 +8 -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/index.d.ts +5 -0
- package/dist/src/domain/model/wallet-points/index.js +5 -0
- package/dist/src/domain/model/wallet-points/index.js.map +1 -1
- package/dist/src/utils/curves.js +1 -1
- package/dist/src/utils/curves.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/src/utils/index.d.ts +1 -0
- package/dist/src/utils/index.js +1 -0
- package/dist/src/utils/index.js.map +1 -1
- 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 +0 -26
- 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
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 = exports.BadgeType || (exports.BadgeType = {}));
|
|
34
|
+
//# 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,SAGX;AAHD,WAAY,SAAS;IACnB,8BAAiB,CAAA;IACjB,oCAAuB,CAAA;AACzB,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GetTxRewardsRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const constants_1 = require("../constants");
|
|
15
|
+
class GetTxRewardsRequest {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsEnum)(constants_1.RewardsTxType),
|
|
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, "solAmount", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
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,4CAA6C;AAE7C,MAAa,mBAAmB;CAkB/B;AAjBC;IAAC,IAAA,wBAAM,EAAC,yBAAa,CAAC;IACrB,IAAA,4BAAU,GAAE;;4DACkB;AAE/B;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uDACM;AAEnB;IAAC,IAAA,4BAAU,GAAE;;sDACK;AAElB;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":";;;AAGA,MAAa,iBAAiB;CAQ7B;AARD,8CAQC"}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
export * from './entities/WalletPoints.entity';
|
|
2
|
+
export * from './entities/Multiplier.entity';
|
|
3
|
+
export * from './entities/TxRewardsResponse.entity';
|
|
2
4
|
export * from './dtos/WalletPoints.dto';
|
|
5
|
+
export * from './dtos/TxRewardsRequest.dto';
|
|
6
|
+
export * from './dtos/RewardBadge.dto';
|
|
7
|
+
export * from './constants';
|
|
@@ -15,5 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./entities/WalletPoints.entity"), exports);
|
|
18
|
+
__exportStar(require("./entities/Multiplier.entity"), exports);
|
|
19
|
+
__exportStar(require("./entities/TxRewardsResponse.entity"), exports);
|
|
18
20
|
__exportStar(require("./dtos/WalletPoints.dto"), exports);
|
|
21
|
+
__exportStar(require("./dtos/TxRewardsRequest.dto"), exports);
|
|
22
|
+
__exportStar(require("./dtos/RewardBadge.dto"), exports);
|
|
23
|
+
__exportStar(require("./constants"), exports);
|
|
19
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/domain/model/wallet-points/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C;AAC/C,0DAAwC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/domain/model/wallet-points/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C;AAC/C,+DAA6C;AAC7C,sEAAoD;AACpD,0DAAwC;AACxC,8DAA4C;AAC5C,yDAAuC;AACvC,8CAA4B"}
|
package/dist/src/utils/curves.js
CHANGED
|
@@ -20,7 +20,7 @@ const toCurveObject = (curveType, collateralCollected = 0n, collateralDecimals)
|
|
|
20
20
|
case constants_1.CurveType.FLAT_V1:
|
|
21
21
|
return new FlatCurveV1_1.FlatCurveV1(collateralCollected, collateralDecimals);
|
|
22
22
|
default:
|
|
23
|
-
throw new Error(`Unsupported curve type
|
|
23
|
+
throw new Error(`Unsupported curve type ${curveType}`);
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
exports.toCurveObject = toCurveObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curves.js","sourceRoot":"","sources":["../../../src/utils/curves.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAEhD,8DAA2D;AAC3D,oFAAiF;AACjF,oFAAiF;AACjF,0FAAuF;AACvF,4FAAyF;AAElF,MAAM,aAAa,GAAG,CAC3B,SAAoB,EACpB,sBAA8B,EAAE,EAChC,kBAA2B,EACZ,EAAE;IACjB,QAAQ,SAAS,EAAE;QACjB,KAAK,qBAAS,CAAC,mBAAmB;YAChC,OAAO,IAAI,+CAAsB,EAAE,CAAC;QACtC,KAAK,qBAAS,CAAC,mBAAmB;YAChC,OAAO,IAAI,+CAAsB,EAAE,CAAC;QACtC,KAAK,qBAAS,CAAC,uBAAuB;YACpC,OAAO,IAAI,qDAAyB,EAAE,CAAC;QACzC,KAAK,qBAAS,CAAC,wBAAwB;YACrC,OAAO,IAAI,uDAA0B,EAAE,CAAC;QAC1C,KAAK,qBAAS,CAAC,OAAO;YACpB,OAAO,IAAI,yBAAW,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAAC;QAClE;YACE,MAAM,IAAI,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"curves.js","sourceRoot":"","sources":["../../../src/utils/curves.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAEhD,8DAA2D;AAC3D,oFAAiF;AACjF,oFAAiF;AACjF,0FAAuF;AACvF,4FAAyF;AAElF,MAAM,aAAa,GAAG,CAC3B,SAAoB,EACpB,sBAA8B,EAAE,EAChC,kBAA2B,EACZ,EAAE;IACjB,QAAQ,SAAS,EAAE;QACjB,KAAK,qBAAS,CAAC,mBAAmB;YAChC,OAAO,IAAI,+CAAsB,EAAE,CAAC;QACtC,KAAK,qBAAS,CAAC,mBAAmB;YAChC,OAAO,IAAI,+CAAsB,EAAE,CAAC;QACtC,KAAK,qBAAS,CAAC,uBAAuB;YACpC,OAAO,IAAI,qDAAyB,EAAE,CAAC;QACzC,KAAK,qBAAS,CAAC,wBAAwB;YACrC,OAAO,IAAI,uDAA0B,EAAE,CAAC;QAC1C,KAAK,qBAAS,CAAC,OAAO;YACpB,OAAO,IAAI,yBAAW,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAAC;QAClE;YACE,MAAM,IAAI,KAAK,CAAC,0BAA0B,SAAS,EAAE,CAAC,CAAC;KAC1D;AACH,CAAC,CAAC;AAnBW,QAAA,aAAa,iBAmBxB"}
|
|
@@ -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"}
|
package/dist/src/utils/index.js
CHANGED
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./numbers"), exports);
|
|
18
18
|
__exportStar(require("./curves"), exports);
|
|
19
|
+
__exportStar(require("./dates"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB"}
|