@heliofi/launchpad-common 1.6.36 → 1.6.38
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/constants/isMoonit.js +1 -1
- package/dist/src/domain/model/fun/constants.d.ts +0 -1
- package/dist/src/domain/model/fun/constants.js +0 -1
- package/dist/src/domain/model/fun/constants.js.map +1 -1
- package/dist/src/domain/model/lp-token-lock-details/entities/FeeReciever.entity.d.ts +8 -0
- package/dist/src/domain/model/lp-token-lock-details/entities/FeeReciever.entity.js +8 -0
- package/dist/src/domain/model/lp-token-lock-details/entities/FeeReciever.entity.js.map +1 -0
- package/dist/src/domain/model/meteora-swap/dtos/MeteoraSwapGetPrice.dto.d.ts +4 -1
- package/dist/src/domain/model/meteora-swap/dtos/MeteoraSwapGetPrice.dto.js +17 -1
- package/dist/src/domain/model/meteora-swap/dtos/MeteoraSwapGetPrice.dto.js.map +1 -1
- package/dist/src/domain/model/meteora-swap/dtos/MeteoraSwapPrepare.dto.d.ts +3 -1
- package/dist/src/domain/model/meteora-swap/dtos/MeteoraSwapPrepare.dto.js +13 -6
- package/dist/src/domain/model/meteora-swap/dtos/MeteoraSwapPrepare.dto.js.map +1 -1
- package/dist/src/domain/model/pumpdex-swap/dtos/PumpDexSwapGetPrice.dto.d.ts +4 -1
- package/dist/src/domain/model/pumpdex-swap/dtos/PumpDexSwapGetPrice.dto.js +17 -1
- package/dist/src/domain/model/pumpdex-swap/dtos/PumpDexSwapGetPrice.dto.js.map +1 -1
- package/dist/src/domain/model/raydium-swap/dtos/RaydiumSwapGetPrice.dto.d.ts +4 -1
- package/dist/src/domain/model/raydium-swap/dtos/RaydiumSwapGetPrice.dto.js +15 -1
- package/dist/src/domain/model/raydium-swap/dtos/RaydiumSwapGetPrice.dto.js.map +1 -1
- package/dist/src/domain/model/swap-router/dtos/SwapRouterGetQuote.dto.d.ts +4 -2
- package/dist/src/domain/model/swap-router/dtos/SwapRouterGetQuote.dto.js +16 -1
- package/dist/src/domain/model/swap-router/dtos/SwapRouterGetQuote.dto.js.map +1 -1
- package/dist/src/domain/model/swap-router/dtos/SwapRouterQuoteAndPrepare.dto.d.ts +0 -2
- package/dist/src/domain/model/swap-router/dtos/SwapRouterQuoteAndPrepare.dto.js +0 -7
- package/dist/src/domain/model/swap-router/dtos/SwapRouterQuoteAndPrepare.dto.js.map +1 -1
- package/dist/src/domain/model/swap-router/entities/SwapRouterQuote.entity.d.ts +1 -0
- package/dist/src/domain/model/swap-router/entities/SwapRouterQuote.entity.js.map +1 -1
- package/dist/src/domain/model/swap-router/entities/SwapRouterQuoteAndPrepareResponse.entity.d.ts +2 -1
- package/dist/src/domain/model/swap-router/entities/SwapRouterQuoteAndPrepareResponse.entity.js.map +1 -1
- package/dist/src/domain/model/token-pair/entities/TokenPair.entity.d.ts +1 -0
- package/dist/src/domain/model/token-pair/entities/TokenPair.entity.js.map +1 -1
- package/dist/src/domain/model/token-pair/entities/TokenPairWithAdvancedTradingData.entity.d.ts +12 -0
- package/dist/src/domain/model/token-pair/entities/TokenPairWithAdvancedTradingData.entity.js +8 -0
- package/dist/src/domain/model/token-pair/entities/TokenPairWithAdvancedTradingData.entity.js.map +1 -0
- package/dist/src/domain/model/token-pair/entities/TokenPairWithMetadata.entity.d.ts +1 -0
- package/dist/src/domain/model/token-pair/entities/TokenPairWithMetadata.entity.js.map +1 -1
- package/dist/src/domain/model/token-pair/entities/index.d.ts +1 -0
- package/dist/src/domain/model/token-pair/entities/index.js +1 -0
- package/dist/src/domain/model/token-pair/entities/index.js.map +1 -1
- package/dist/src/domain/validations/SanitizeRegex.js +1 -1
- package/dist/src/domain/validations/SanitizeRegex.js.map +1 -1
- package/dist/src/domain/validations/SanitizeRegex.spec.d.ts +1 -0
- package/dist/src/domain/validations/SanitizeRegex.spec.js +77 -0
- package/dist/src/domain/validations/SanitizeRegex.spec.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/src/domain/constants/feeReceiver.d.ts +0 -6
- package/dist/src/domain/constants/feeReceiver.js +0 -11
- package/dist/src/domain/constants/feeReceiver.js.map +0 -1
- package/dist/src/domain/model/lpLockDetails/dtos/AddAllocation.dto.d.ts +0 -7
- package/dist/src/domain/model/lpLockDetails/dtos/AddAllocation.dto.js +0 -38
- package/dist/src/domain/model/lpLockDetails/dtos/AddAllocation.dto.js.map +0 -1
- package/dist/src/domain/model/lpLockDetails/index.d.ts +0 -1
- package/dist/src/domain/model/lpLockDetails/index.js +0 -18
- package/dist/src/domain/model/lpLockDetails/index.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isMoonitToken = void 0;
|
|
4
|
-
const isMoonitToken = (tokenPair) => tokenPair > new Date('2025-04-
|
|
4
|
+
const isMoonitToken = (tokenPair) => tokenPair > new Date('2025-04-02T16:00:00Z');
|
|
5
5
|
exports.isMoonitToken = isMoonitToken;
|
|
6
6
|
//# sourceMappingURL=isMoonit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/domain/model/fun/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,2BAAa,CAAA;AACf,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB;AAED,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,qCAAuB,CAAA;IACvB,6CAA+B,CAAA;AACjC,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/domain/model/fun/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,2BAAa,CAAA;AACf,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB;AAED,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,qCAAuB,CAAA;IACvB,6CAA+B,CAAA;AACjC,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB;AAED,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,+BAAqB,CAAA;IACrB,qBAAW,CAAA;IACX,+BAAqB,CAAA;IACrB,mCAAyB,CAAA;AAC3B,CAAC,EALW,MAAM,GAAN,cAAM,KAAN,cAAM,QAKjB;AAED,IAAY,MAMX;AAND,WAAY,MAAM;IAChB,8BAAoB,CAAA;IACpB,iCAAuB,CAAA;IACvB,+BAAqB,CAAA;IACrB,6BAAmB,CAAA;IACnB,gCAAsB,CAAA;AACxB,CAAC,EANW,MAAM,GAAN,cAAM,KAAN,cAAM,QAMjB;AAED,IAAY,MAMX;AAND,WAAY,MAAM;IAChB,kCAAwB,CAAA;IACxB,+BAAqB,CAAA;IACrB,kCAAwB,CAAA;IACxB,gCAAsB,CAAA;IACtB,yCAA+B,CAAA;AACjC,CAAC,EANW,MAAM,GAAN,cAAM,KAAN,cAAM,QAMjB;AAED,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf,+BAAe,CAAA;IACf,2BAAW,CAAA;AACb,CAAC,EANW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAMvB;AAEY,QAAA,YAAY,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FeeReciever = void 0;
|
|
4
|
+
const entity_1 = require("../../entity");
|
|
5
|
+
class FeeReciever extends entity_1.Entity {
|
|
6
|
+
}
|
|
7
|
+
exports.FeeReciever = FeeReciever;
|
|
8
|
+
//# sourceMappingURL=FeeReciever.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeeReciever.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/lp-token-lock-details/entities/FeeReciever.entity.ts"],"names":[],"mappings":";;;AACA,yCAAsC;AAEtC,MAAa,WAAY,SAAQ,eAAM;CAQtC;AARD,kCAQC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { SwapType } from '../../../constants';
|
|
1
2
|
export declare class MeteoraSwapGetPriceDto {
|
|
2
3
|
poolId: string;
|
|
3
4
|
mintFrom: string;
|
|
4
5
|
mintTo: string;
|
|
5
|
-
amountIn
|
|
6
|
+
amountIn?: string;
|
|
7
|
+
amountOut?: string;
|
|
8
|
+
swapType: SwapType;
|
|
6
9
|
slippageBps: number;
|
|
7
10
|
decimalsFrom?: number;
|
|
8
11
|
decimalsTo?: number;
|
|
@@ -13,7 +13,11 @@ exports.MeteoraSwapGetPriceDto = void 0;
|
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const validations_1 = require("../../../validations");
|
|
16
|
+
const constants_1 = require("../../../constants");
|
|
16
17
|
class MeteoraSwapGetPriceDto {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.swapType = constants_1.SwapType.EXACT_IN;
|
|
20
|
+
}
|
|
17
21
|
}
|
|
18
22
|
__decorate([
|
|
19
23
|
(0, class_validator_1.IsString)(),
|
|
@@ -32,10 +36,22 @@ __decorate([
|
|
|
32
36
|
], MeteoraSwapGetPriceDto.prototype, "mintTo", void 0);
|
|
33
37
|
__decorate([
|
|
34
38
|
(0, class_transformer_1.Transform)(({ value }) => BigInt(value)),
|
|
35
|
-
(0, class_validator_1.
|
|
39
|
+
(0, class_validator_1.ValidateIf)((o) => o.swapType === constants_1.SwapType.EXACT_IN),
|
|
36
40
|
(0, class_validator_1.Validate)(validations_1.MinBigInt),
|
|
37
41
|
__metadata("design:type", String)
|
|
38
42
|
], MeteoraSwapGetPriceDto.prototype, "amountIn", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_transformer_1.Transform)(({ value }) => BigInt(value)),
|
|
45
|
+
(0, class_validator_1.ValidateIf)((o) => o.swapType === constants_1.SwapType.EXACT_OUT),
|
|
46
|
+
(0, class_validator_1.Validate)(validations_1.MinBigInt),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], MeteoraSwapGetPriceDto.prototype, "amountOut", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
(0, class_validator_1.IsEnum)(constants_1.SwapType),
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], MeteoraSwapGetPriceDto.prototype, "swapType", void 0);
|
|
39
55
|
__decorate([
|
|
40
56
|
(0, class_validator_1.IsNumber)(),
|
|
41
57
|
(0, class_validator_1.IsNotEmpty)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MeteoraSwapGetPrice.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/meteora-swap/dtos/MeteoraSwapGetPrice.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"MeteoraSwapGetPrice.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/meteora-swap/dtos/MeteoraSwapGetPrice.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAC9C,qDAUyB;AACzB,sDAAiD;AACjD,kDAA8C;AAE9C,MAAa,sBAAsB;IAAnC;QA0BE,aAAQ,GAAa,oBAAQ,CAAC,QAAQ,CAAC;IAezC,CAAC;CAAA;AAxCC;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACE;AAEf;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACI;AAEjB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACE;AAEf;IAAC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,IAAA,4BAAU,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,oBAAQ,CAAC,QAAQ,CAAC;IACnD,IAAA,0BAAQ,EAAC,uBAAS,CAAC;;wDACF;AAElB;IAAC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,IAAA,4BAAU,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,oBAAQ,CAAC,SAAS,CAAC;IACpD,IAAA,0BAAQ,EAAC,uBAAS,CAAC;;yDACD;AAEnB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,oBAAQ,CAAC;IAChB,IAAA,4BAAU,GAAE;;wDAC0B;AAEvC;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,qBAAG,EAAC,KAAK,CAAC;;2DACS;AAEpB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACS;AAEtB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACO;AAxCtB,wDAyCC"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { TxPriorityDto } from '../../tx';
|
|
2
|
+
import { SwapType } from '../../../constants';
|
|
2
3
|
export declare class MeteoraSwapPrepareDto {
|
|
3
4
|
sender: string;
|
|
4
5
|
poolId: string;
|
|
5
6
|
mintFrom: string;
|
|
6
7
|
mintTo: string;
|
|
7
8
|
amountIn: string;
|
|
9
|
+
amountOut: string;
|
|
10
|
+
swapType?: SwapType;
|
|
8
11
|
feeAmount?: string;
|
|
9
12
|
feeBps?: number;
|
|
10
13
|
feeMintAddress: string;
|
|
11
14
|
priorityFee?: number;
|
|
12
15
|
priority?: TxPriorityDto;
|
|
13
|
-
amountOut: string;
|
|
14
16
|
}
|
|
@@ -14,6 +14,7 @@ const class_transformer_1 = require("class-transformer");
|
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const validations_1 = require("../../../validations");
|
|
16
16
|
const tx_1 = require("../../tx");
|
|
17
|
+
const constants_1 = require("../../../constants");
|
|
17
18
|
class MeteoraSwapPrepareDto {
|
|
18
19
|
}
|
|
19
20
|
__decorate([
|
|
@@ -42,6 +43,18 @@ __decorate([
|
|
|
42
43
|
(0, class_validator_1.Validate)(validations_1.MinBigInt),
|
|
43
44
|
__metadata("design:type", String)
|
|
44
45
|
], MeteoraSwapPrepareDto.prototype, "amountIn", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_transformer_1.Transform)(({ value }) => BigInt(value)),
|
|
48
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
49
|
+
(0, class_validator_1.Validate)(validations_1.MinBigInt),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], MeteoraSwapPrepareDto.prototype, "amountOut", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsString)(),
|
|
54
|
+
(0, class_validator_1.IsEnum)(constants_1.SwapType),
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], MeteoraSwapPrepareDto.prototype, "swapType", void 0);
|
|
45
58
|
__decorate([
|
|
46
59
|
(0, class_transformer_1.Transform)(({ value }) => value ?? BigInt(value)),
|
|
47
60
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -70,11 +83,5 @@ __decorate([
|
|
|
70
83
|
(0, class_validator_1.IsOptional)(),
|
|
71
84
|
__metadata("design:type", tx_1.TxPriorityDto)
|
|
72
85
|
], MeteoraSwapPrepareDto.prototype, "priority", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, class_transformer_1.Transform)(({ value }) => BigInt(value)),
|
|
75
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
76
|
-
(0, class_validator_1.Validate)(validations_1.MinBigInt),
|
|
77
|
-
__metadata("design:type", String)
|
|
78
|
-
], MeteoraSwapPrepareDto.prototype, "amountOut", void 0);
|
|
79
86
|
exports.MeteoraSwapPrepareDto = MeteoraSwapPrepareDto;
|
|
80
87
|
//# sourceMappingURL=MeteoraSwapPrepare.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MeteoraSwapPrepare.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/meteora-swap/dtos/MeteoraSwapPrepare.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"MeteoraSwapPrepare.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/meteora-swap/dtos/MeteoraSwapPrepare.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAoD;AACpD,qDAUyB;AACzB,sDAAiD;AACjD,iCAAyC;AACzC,kDAA8C;AAE9C,MAAa,qBAAqB;CAsDjC;AArDC;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACE;AAEf;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACE;AAEf;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uDACI;AAEjB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACE;AAEf;IAAC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,uBAAS,CAAC;;uDACH;AAEjB;IAAC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,uBAAS,CAAC;;wDACF;AAElB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,oBAAQ,CAAC;IAChB,IAAA,4BAAU,GAAE;;uDACO;AAEpB;IAAC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;IAChD,IAAA,4BAAU,GAAE;;wDACM;AAEnB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,KAAK,CAAC;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,4BAAU,GAAE;;qDACG;AAEhB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6DACU;AAEvB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACQ;AAErB;IAAC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,kBAAa,CAAC;IACzB,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,GAAE;8BACF,kBAAa;uDAAC;AArD3B,sDAsDC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { SwapType } from '../../../constants';
|
|
1
2
|
export declare class PumpDexSwapGetPriceDto {
|
|
2
3
|
poolId: string;
|
|
3
4
|
mintFrom: string;
|
|
4
5
|
mintTo: string;
|
|
5
|
-
amountIn
|
|
6
|
+
amountIn?: string;
|
|
7
|
+
amountOut?: string;
|
|
8
|
+
swapType: SwapType;
|
|
6
9
|
slippageBps: number;
|
|
7
10
|
decimalsFrom?: number;
|
|
8
11
|
decimalsTo?: number;
|
|
@@ -13,7 +13,11 @@ exports.PumpDexSwapGetPriceDto = void 0;
|
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const validations_1 = require("../../../validations");
|
|
16
|
+
const constants_1 = require("../../../constants");
|
|
16
17
|
class PumpDexSwapGetPriceDto {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.swapType = constants_1.SwapType.EXACT_IN;
|
|
20
|
+
}
|
|
17
21
|
}
|
|
18
22
|
__decorate([
|
|
19
23
|
(0, class_validator_1.IsString)(),
|
|
@@ -32,10 +36,22 @@ __decorate([
|
|
|
32
36
|
], PumpDexSwapGetPriceDto.prototype, "mintTo", void 0);
|
|
33
37
|
__decorate([
|
|
34
38
|
(0, class_transformer_1.Transform)(({ value }) => BigInt(value)),
|
|
35
|
-
(0, class_validator_1.
|
|
39
|
+
(0, class_validator_1.ValidateIf)((o) => o.swapType === constants_1.SwapType.EXACT_IN),
|
|
36
40
|
(0, class_validator_1.Validate)(validations_1.MinBigInt),
|
|
37
41
|
__metadata("design:type", String)
|
|
38
42
|
], PumpDexSwapGetPriceDto.prototype, "amountIn", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_transformer_1.Transform)(({ value }) => BigInt(value)),
|
|
45
|
+
(0, class_validator_1.ValidateIf)((o) => o.swapType === constants_1.SwapType.EXACT_OUT),
|
|
46
|
+
(0, class_validator_1.Validate)(validations_1.MinBigInt),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], PumpDexSwapGetPriceDto.prototype, "amountOut", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
(0, class_validator_1.IsEnum)(constants_1.SwapType),
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], PumpDexSwapGetPriceDto.prototype, "swapType", void 0);
|
|
39
55
|
__decorate([
|
|
40
56
|
(0, class_validator_1.IsNumber)(),
|
|
41
57
|
(0, class_validator_1.IsNotEmpty)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PumpDexSwapGetPrice.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/pumpdex-swap/dtos/PumpDexSwapGetPrice.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"PumpDexSwapGetPrice.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/pumpdex-swap/dtos/PumpDexSwapGetPrice.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAC9C,qDAUyB;AACzB,sDAAiD;AACjD,kDAA8C;AAE9C,MAAa,sBAAsB;IAAnC;QA0BE,aAAQ,GAAa,oBAAQ,CAAC,QAAQ,CAAC;IAezC,CAAC;CAAA;AAxCC;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACE;AAEf;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACI;AAEjB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACE;AAEf;IAAC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,IAAA,4BAAU,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,oBAAQ,CAAC,QAAQ,CAAC;IACnD,IAAA,0BAAQ,EAAC,uBAAS,CAAC;;wDACF;AAElB;IAAC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,IAAA,4BAAU,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,oBAAQ,CAAC,SAAS,CAAC;IACpD,IAAA,0BAAQ,EAAC,uBAAS,CAAC;;yDACD;AAEnB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,oBAAQ,CAAC;IAChB,IAAA,4BAAU,GAAE;;wDAC0B;AAEvC;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,qBAAG,EAAC,KAAK,CAAC;;2DACS;AAEpB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACS;AAEtB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACO;AAxCtB,wDAyCC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { SwapType } from '../../../constants';
|
|
1
2
|
export declare class RaydiumSwapGetPriceDto {
|
|
2
3
|
poolId: string;
|
|
3
4
|
mintFrom: string;
|
|
4
5
|
mintTo: string;
|
|
5
|
-
amountIn
|
|
6
|
+
amountIn?: string;
|
|
7
|
+
amountOut?: string;
|
|
8
|
+
swapType: SwapType;
|
|
6
9
|
slippageBps: number;
|
|
7
10
|
decimalsFrom?: number;
|
|
8
11
|
decimalsTo?: number;
|
|
@@ -13,8 +13,10 @@ exports.RaydiumSwapGetPriceDto = void 0;
|
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const validations_1 = require("../../../validations");
|
|
16
|
+
const constants_1 = require("../../../constants");
|
|
16
17
|
class RaydiumSwapGetPriceDto {
|
|
17
18
|
constructor() {
|
|
19
|
+
this.swapType = constants_1.SwapType.EXACT_IN;
|
|
18
20
|
this.slippageBps = 0;
|
|
19
21
|
}
|
|
20
22
|
}
|
|
@@ -35,10 +37,22 @@ __decorate([
|
|
|
35
37
|
], RaydiumSwapGetPriceDto.prototype, "mintTo", void 0);
|
|
36
38
|
__decorate([
|
|
37
39
|
(0, class_transformer_1.Transform)(({ value }) => BigInt(value)),
|
|
38
|
-
(0, class_validator_1.
|
|
40
|
+
(0, class_validator_1.ValidateIf)((o) => o.swapType === constants_1.SwapType.EXACT_IN),
|
|
39
41
|
(0, class_validator_1.Validate)(validations_1.MinBigInt),
|
|
40
42
|
__metadata("design:type", String)
|
|
41
43
|
], RaydiumSwapGetPriceDto.prototype, "amountIn", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_transformer_1.Transform)(({ value }) => BigInt(value)),
|
|
46
|
+
(0, class_validator_1.ValidateIf)((o) => o.swapType === constants_1.SwapType.EXACT_OUT),
|
|
47
|
+
(0, class_validator_1.Validate)(validations_1.MinBigInt),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], RaydiumSwapGetPriceDto.prototype, "amountOut", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsString)(),
|
|
52
|
+
(0, class_validator_1.IsEnum)(constants_1.SwapType),
|
|
53
|
+
(0, class_validator_1.IsOptional)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], RaydiumSwapGetPriceDto.prototype, "swapType", void 0);
|
|
42
56
|
__decorate([
|
|
43
57
|
(0, class_validator_1.IsNumber)(),
|
|
44
58
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RaydiumSwapGetPrice.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/raydium-swap/dtos/RaydiumSwapGetPrice.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"RaydiumSwapGetPrice.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/raydium-swap/dtos/RaydiumSwapGetPrice.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAC9C,qDAUyB;AACzB,sDAAiD;AACjD,kDAA8C;AAE9C,MAAa,sBAAsB;IAAnC;QA0BE,aAAQ,GAAa,oBAAQ,CAAC,QAAQ,CAAC;QAMvC,gBAAW,GAAW,CAAC,CAAC;IAS1B,CAAC;CAAA;AAxCC;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACE;AAEf;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACI;AAEjB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACE;AAEf;IAAC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,IAAA,4BAAU,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,oBAAQ,CAAC,QAAQ,CAAC;IACnD,IAAA,0BAAQ,EAAC,uBAAS,CAAC;;wDACF;AAElB;IAAC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,IAAA,4BAAU,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,oBAAQ,CAAC,SAAS,CAAC;IACpD,IAAA,0BAAQ,EAAC,uBAAS,CAAC;;yDACD;AAEnB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,oBAAQ,CAAC;IAChB,IAAA,4BAAU,GAAE;;wDAC0B;AAEvC;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,qBAAG,EAAC,KAAK,CAAC;;2DACa;AAExB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACS;AAEtB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACO;AAxCtB,wDAyCC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { BlockchainSymbol } from '../../../constants';
|
|
1
|
+
import { BlockchainSymbol, SwapType } from '../../../constants';
|
|
2
2
|
export declare class SwapRouterQuoteDto {
|
|
3
3
|
mintFrom: string;
|
|
4
4
|
mintTo: string;
|
|
5
5
|
chainId?: BlockchainSymbol;
|
|
6
|
-
amountIn
|
|
6
|
+
amountIn?: string;
|
|
7
|
+
amountOut?: string;
|
|
8
|
+
swapType: SwapType;
|
|
7
9
|
slippageBps: number;
|
|
8
10
|
}
|
|
@@ -15,6 +15,9 @@ const class_transformer_1 = require("class-transformer");
|
|
|
15
15
|
const validations_1 = require("../../../validations");
|
|
16
16
|
const constants_1 = require("../../../constants");
|
|
17
17
|
class SwapRouterQuoteDto {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.swapType = constants_1.SwapType.EXACT_IN;
|
|
20
|
+
}
|
|
18
21
|
}
|
|
19
22
|
__decorate([
|
|
20
23
|
(0, class_validator_1.IsString)(),
|
|
@@ -36,10 +39,22 @@ __decorate([
|
|
|
36
39
|
], SwapRouterQuoteDto.prototype, "chainId", void 0);
|
|
37
40
|
__decorate([
|
|
38
41
|
(0, class_transformer_1.Transform)(({ value }) => BigInt(value)),
|
|
39
|
-
(0, class_validator_1.
|
|
42
|
+
(0, class_validator_1.ValidateIf)((o) => o.swapType === constants_1.SwapType.EXACT_IN),
|
|
40
43
|
(0, class_validator_1.Validate)(validations_1.MinBigInt),
|
|
41
44
|
__metadata("design:type", String)
|
|
42
45
|
], SwapRouterQuoteDto.prototype, "amountIn", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_transformer_1.Transform)(({ value }) => BigInt(value)),
|
|
48
|
+
(0, class_validator_1.ValidateIf)((o) => o.swapType === constants_1.SwapType.EXACT_OUT),
|
|
49
|
+
(0, class_validator_1.Validate)(validations_1.MinBigInt),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], SwapRouterQuoteDto.prototype, "amountOut", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsString)(),
|
|
54
|
+
(0, class_validator_1.IsEnum)(constants_1.SwapType),
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], SwapRouterQuoteDto.prototype, "swapType", void 0);
|
|
43
58
|
__decorate([
|
|
44
59
|
(0, class_transformer_1.Transform)(({ value }) => Number(value)),
|
|
45
60
|
(0, class_validator_1.IsNumber)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwapRouterGetQuote.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/swap-router/dtos/SwapRouterGetQuote.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"SwapRouterGetQuote.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/swap-router/dtos/SwapRouterGetQuote.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAUyB;AACzB,yDAA8C;AAC9C,sDAAgE;AAChE,kDAAgE;AAEhE,MAAa,kBAAkB;IAA/B;QA6BE,aAAQ,GAAa,oBAAQ,CAAC,QAAQ,CAAC;IAQzC,CAAC;CAAA;AApCC;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAa,GAAE;;oDACC;AAEjB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAa,GAAE;;kDACD;AAEf;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAa,GAAE;;mDACW;AAE3B;IAAC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,IAAA,4BAAU,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,oBAAQ,CAAC,QAAQ,CAAC;IACnD,IAAA,0BAAQ,EAAC,uBAAS,CAAC;;oDACF;AAElB;IAAC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,IAAA,4BAAU,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,oBAAQ,CAAC,SAAS,CAAC;IACpD,IAAA,0BAAQ,EAAC,uBAAS,CAAC;;qDACD;AAEnB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,oBAAQ,CAAC;IAChB,IAAA,4BAAU,GAAE;;oDAC0B;AAEvC;IAAC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,qBAAG,EAAC,KAAK,CAAC;;uDACS;AApCtB,gDAqCC"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { SwapType } from '../../../constants';
|
|
2
1
|
import { SwapRouterQuoteDto } from './SwapRouterGetQuote.dto';
|
|
3
2
|
import { TxPriorityDto } from '../../tx';
|
|
4
3
|
export declare class SwapRouterQuoteAndPrepareDto extends SwapRouterQuoteDto {
|
|
5
4
|
sender: string;
|
|
6
5
|
feeBps?: number;
|
|
7
6
|
feeMintAddress: string;
|
|
8
|
-
swapType?: SwapType;
|
|
9
7
|
priorityFee?: number;
|
|
10
8
|
priority?: TxPriorityDto;
|
|
11
9
|
}
|
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.SwapRouterQuoteAndPrepareDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const constants_1 = require("../../../constants");
|
|
16
15
|
const SwapRouterGetQuote_dto_1 = require("./SwapRouterGetQuote.dto");
|
|
17
16
|
const tx_1 = require("../../tx");
|
|
18
17
|
class SwapRouterQuoteAndPrepareDto extends SwapRouterGetQuote_dto_1.SwapRouterQuoteDto {
|
|
@@ -34,12 +33,6 @@ __decorate([
|
|
|
34
33
|
(0, class_validator_1.IsNotEmpty)(),
|
|
35
34
|
__metadata("design:type", String)
|
|
36
35
|
], SwapRouterQuoteAndPrepareDto.prototype, "feeMintAddress", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, class_validator_1.IsString)(),
|
|
39
|
-
(0, class_validator_1.IsEnum)(constants_1.SwapType),
|
|
40
|
-
(0, class_validator_1.IsOptional)(),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], SwapRouterQuoteAndPrepareDto.prototype, "swapType", void 0);
|
|
43
36
|
__decorate([
|
|
44
37
|
(0, class_validator_1.IsNumber)(),
|
|
45
38
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwapRouterQuoteAndPrepare.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/swap-router/dtos/SwapRouterQuoteAndPrepare.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"SwapRouterQuoteAndPrepare.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/swap-router/dtos/SwapRouterQuoteAndPrepare.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAQyB;AACzB,yDAAyC;AACzC,qEAA8D;AAC9D,iCAAyC;AAEzC,MAAa,4BAA6B,SAAQ,2CAAkB;CAuBnE;AAtBC;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACE;AAEf;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,KAAK,CAAC;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,4BAAU,GAAE;;4DACG;AAEhB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oEACU;AAEvB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iEACQ;AAErB;IAAC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,kBAAa,CAAC;IACzB,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,GAAE;8BACF,kBAAa;8DAAC;AAtB3B,oEAuBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwapRouterQuote.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/swap-router/entities/SwapRouterQuote.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAGtC,MAAa,eAAgB,SAAQ,eAAM;
|
|
1
|
+
{"version":3,"file":"SwapRouterQuote.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/swap-router/entities/SwapRouterQuote.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAGtC,MAAa,eAAgB,SAAQ,eAAM;CAU1C;AAVD,0CAUC"}
|
package/dist/src/domain/model/swap-router/entities/SwapRouterQuoteAndPrepareResponse.entity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwapRouterQuoteAndPrepareResponse.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/swap-router/entities/SwapRouterQuoteAndPrepareResponse.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAEtC,MAAa,uCAAwC,SAAQ,eAAM;
|
|
1
|
+
{"version":3,"file":"SwapRouterQuoteAndPrepareResponse.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/swap-router/entities/SwapRouterQuoteAndPrepareResponse.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAEtC,MAAa,uCAAwC,SAAQ,eAAM;CAQlE;AARD,0FAQC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenPair.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/token-pair/entities/TokenPair.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAMtC,MAAa,SAAU,SAAQ,eAAM;
|
|
1
|
+
{"version":3,"file":"TokenPair.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/token-pair/entities/TokenPair.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAMtC,MAAa,SAAU,SAAQ,eAAM;CAkDpC;AAlDD,8BAkDC"}
|
package/dist/src/domain/model/token-pair/entities/TokenPairWithAdvancedTradingData.entity.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TokenPairUnpopulated } from './TokenPairUnpopulated.entity';
|
|
2
|
+
export declare class TokenPairWithAdvancedTradingData extends TokenPairUnpopulated {
|
|
3
|
+
volumeCount: number;
|
|
4
|
+
volumeUSD: string;
|
|
5
|
+
commentCount: string;
|
|
6
|
+
progressPercent: number;
|
|
7
|
+
marketcap: string;
|
|
8
|
+
totalHolders?: string;
|
|
9
|
+
top10HolderPercentage?: string;
|
|
10
|
+
devHolding?: string;
|
|
11
|
+
snipers?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TokenPairWithAdvancedTradingData = void 0;
|
|
4
|
+
const TokenPairUnpopulated_entity_1 = require("./TokenPairUnpopulated.entity");
|
|
5
|
+
class TokenPairWithAdvancedTradingData extends TokenPairUnpopulated_entity_1.TokenPairUnpopulated {
|
|
6
|
+
}
|
|
7
|
+
exports.TokenPairWithAdvancedTradingData = TokenPairWithAdvancedTradingData;
|
|
8
|
+
//# sourceMappingURL=TokenPairWithAdvancedTradingData.entity.js.map
|
package/dist/src/domain/model/token-pair/entities/TokenPairWithAdvancedTradingData.entity.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenPairWithAdvancedTradingData.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/token-pair/entities/TokenPairWithAdvancedTradingData.entity.ts"],"names":[],"mappings":";;;AAAA,+EAAqE;AAErE,MAAa,gCAAiC,SAAQ,kDAAoB;CAkBzE;AAlBD,4EAkBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenPairWithMetadata.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/token-pair/entities/TokenPairWithMetadata.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAItC,MAAa,qBAAsB,SAAQ,eAAM;
|
|
1
|
+
{"version":3,"file":"TokenPairWithMetadata.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/token-pair/entities/TokenPairWithMetadata.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAItC,MAAa,qBAAsB,SAAQ,eAAM;CAoDhD;AApDD,sDAoDC"}
|
|
@@ -18,4 +18,5 @@ __exportStar(require("./TokenPair.entity"), exports);
|
|
|
18
18
|
__exportStar(require("./TokenPairWithMetadata.entity"), exports);
|
|
19
19
|
__exportStar(require("./TokenPairWithTradingData.entity"), exports);
|
|
20
20
|
__exportStar(require("./TokenPairUnpopulated.entity"), exports);
|
|
21
|
+
__exportStar(require("./TokenPairWithAdvancedTradingData.entity"), exports);
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/domain/model/token-pair/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,iEAA+C;AAC/C,oEAAkD;AAClD,gEAA8C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/domain/model/token-pair/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,iEAA+C;AAC/C,oEAAkD;AAClD,gEAA8C;AAC9C,4EAA0D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SanitizeRegex.js","sourceRoot":"","sources":["../../../../src/domain/validations/SanitizeRegex.ts"],"names":[],"mappings":";;;AAAA,yDAA8C;AAY9C,SAAgB,aAAa;IAC3B,OAAO,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,OAAO,KAAK,CAAC;SACd;
|
|
1
|
+
{"version":3,"file":"SanitizeRegex.js","sourceRoot":"","sources":["../../../../src/domain/validations/SanitizeRegex.ts"],"names":[],"mappings":";;;AAAA,yDAA8C;AAY9C,SAAgB,aAAa;IAC3B,OAAO,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,OAAO,KAAK,CAAC;SACd;QAED,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;QAEzD,IAAI,CAAC,SAAS,EAAE;YACd,OAAO,IAAI,CAAC;SACb;QAED,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,sCAcC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
const class_transformer_1 = require("class-transformer");
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const SanitizeRegex_1 = require("./SanitizeRegex");
|
|
15
|
+
class TestDto {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, SanitizeRegex_1.SanitizeRegex)(),
|
|
19
|
+
(0, class_validator_1.IsString)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], TestDto.prototype, "term", void 0);
|
|
22
|
+
describe('SanitizeRegex', () => {
|
|
23
|
+
const transformAndValidate = (value) => {
|
|
24
|
+
const dto = (0, class_transformer_1.plainToInstance)(TestDto, { term: value });
|
|
25
|
+
const errors = (0, class_validator_1.validateSync)(dto);
|
|
26
|
+
expect(errors).toHaveLength(0);
|
|
27
|
+
return dto;
|
|
28
|
+
};
|
|
29
|
+
it('should allow alphanumeric characters', () => {
|
|
30
|
+
const result = transformAndValidate('abc123');
|
|
31
|
+
expect(result.term).toBe('abc123');
|
|
32
|
+
});
|
|
33
|
+
it('should allow underscores and hyphens', () => {
|
|
34
|
+
const result = transformAndValidate('abc_123-xyz');
|
|
35
|
+
expect(result.term).toBe('abc_123-xyz');
|
|
36
|
+
});
|
|
37
|
+
it('should allow spaces', () => {
|
|
38
|
+
const result = transformAndValidate('Me Gusta');
|
|
39
|
+
expect(result.term).toBe('Me Gusta');
|
|
40
|
+
});
|
|
41
|
+
it('should remove special characters', () => {
|
|
42
|
+
const result = transformAndValidate('abc@#$%^&*()!?');
|
|
43
|
+
expect(result.term).toBe('abc');
|
|
44
|
+
});
|
|
45
|
+
it('should handle mixed valid and invalid characters', () => {
|
|
46
|
+
const result = transformAndValidate('Hello, World! 123-_');
|
|
47
|
+
expect(result.term).toBe('Hello World 123-_');
|
|
48
|
+
});
|
|
49
|
+
it('should handle empty strings after sanitization by returning null', () => {
|
|
50
|
+
const dto = (0, class_transformer_1.plainToInstance)(TestDto, { term: '@#$%^&' });
|
|
51
|
+
const errors = (0, class_validator_1.validateSync)(dto);
|
|
52
|
+
expect(errors).toHaveLength(1);
|
|
53
|
+
expect(errors[0].constraints).toHaveProperty('isString');
|
|
54
|
+
});
|
|
55
|
+
it('should not transform values but they will fail validation if not strings', () => {
|
|
56
|
+
const dto = (0, class_transformer_1.plainToInstance)(TestDto, { term: 123 });
|
|
57
|
+
const errors = (0, class_validator_1.validateSync)(dto);
|
|
58
|
+
expect(errors).toHaveLength(1);
|
|
59
|
+
expect(errors[0].constraints).toHaveProperty('isString');
|
|
60
|
+
});
|
|
61
|
+
it('should correctly handle search terms with spaces like "Me Gusta"', () => {
|
|
62
|
+
const result = transformAndValidate('Me Gusta');
|
|
63
|
+
expect(result.term).toBe('Me Gusta');
|
|
64
|
+
});
|
|
65
|
+
it('should preserve tokens like "SPL" and "METEORA"', () => {
|
|
66
|
+
const resultSPL = transformAndValidate('SPL');
|
|
67
|
+
expect(resultSPL.term).toBe('SPL');
|
|
68
|
+
const resultMETEORA = transformAndValidate('METEORA');
|
|
69
|
+
expect(resultMETEORA.term).toBe('METEORA');
|
|
70
|
+
});
|
|
71
|
+
it('should sanitize but preserve valid parts of a token address', () => {
|
|
72
|
+
const address = 'GjZ71j5RwxTpEERQCPiAArn7dEoVXnpyBPe7hQ7Wmoon';
|
|
73
|
+
const result = transformAndValidate(address);
|
|
74
|
+
expect(result.term).toBe(address);
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
//# sourceMappingURL=SanitizeRegex.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SanitizeRegex.spec.js","sourceRoot":"","sources":["../../../../src/domain/validations/SanitizeRegex.spec.ts"],"names":[],"mappings":"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"}
|