@heliofi/launchpad-common 1.7.33 → 1.7.35
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/blockchain.d.ts +2 -1
- package/dist/src/domain/constants/blockchain.js +1 -0
- package/dist/src/domain/constants/blockchain.js.map +1 -1
- package/dist/src/domain/constants/currency.d.ts +1 -0
- package/dist/src/domain/constants/currency.js +4 -0
- package/dist/src/domain/constants/currency.js.map +1 -1
- package/dist/src/domain/constants/dex.d.ts +2 -1
- package/dist/src/domain/constants/dex.js +1 -0
- package/dist/src/domain/constants/dex.js.map +1 -1
- package/dist/src/domain/constants/feeFeature.d.ts +1 -0
- package/dist/src/domain/constants/feeFeature.js +1 -0
- package/dist/src/domain/constants/feeFeature.js.map +1 -1
- package/dist/src/domain/constants/migrationDex.d.ts +3 -1
- package/dist/src/domain/constants/migrationDex.js +4 -0
- package/dist/src/domain/constants/migrationDex.js.map +1 -1
- package/dist/src/domain/constants/migrationTarget.d.ts +4 -2
- package/dist/src/domain/constants/migrationTarget.js +6 -3
- package/dist/src/domain/constants/migrationTarget.js.map +1 -1
- package/dist/src/domain/constants/protocol.d.ts +1 -2
- package/dist/src/domain/constants/protocol.js +0 -2
- package/dist/src/domain/constants/protocol.js.map +1 -1
- package/dist/src/domain/constants/solMintAddress.d.ts +2 -0
- package/dist/src/domain/constants/solMintAddress.js +3 -1
- package/dist/src/domain/constants/solMintAddress.js.map +1 -1
- package/dist/src/domain/curves/FogoConstantProductCurveV1.d.ts +6 -0
- package/dist/src/domain/curves/FogoConstantProductCurveV1.js +31 -0
- package/dist/src/domain/curves/FogoConstantProductCurveV1.js.map +1 -0
- package/dist/src/domain/curves/index.d.ts +1 -0
- package/dist/src/domain/curves/index.js +1 -0
- package/dist/src/domain/curves/index.js.map +1 -1
- package/dist/src/domain/curves/tests/FogoConstantProductV1.spec.d.ts +1 -0
- package/dist/src/domain/curves/tests/FogoConstantProductV1.spec.js +125 -0
- package/dist/src/domain/curves/tests/FogoConstantProductV1.spec.js.map +1 -0
- package/dist/src/domain/curves/types.js +1 -0
- package/dist/src/domain/curves/types.js.map +1 -1
- package/dist/src/domain/model/index.d.ts +1 -0
- package/dist/src/domain/model/index.js +1 -0
- package/dist/src/domain/model/index.js.map +1 -1
- package/dist/src/domain/model/permission/Permission.d.ts +1 -0
- package/dist/src/domain/model/permission/Permission.js +1 -0
- package/dist/src/domain/model/permission/Permission.js.map +1 -1
- package/dist/src/domain/model/swap-evm/dtos/SwapEvmPrepare.dto.d.ts +1 -1
- package/dist/src/domain/model/swap-evm/dtos/SwapEvmPrepare.dto.js +1 -1
- package/dist/src/domain/model/valiant-swap/dtos/ValiantSwapGetPrice.dto.d.ts +12 -0
- package/dist/src/domain/model/valiant-swap/dtos/ValiantSwapGetPrice.dto.js +70 -0
- package/dist/src/domain/model/valiant-swap/dtos/ValiantSwapGetPrice.dto.js.map +1 -0
- package/dist/src/domain/model/valiant-swap/dtos/ValiantSwapPrepare.dto.d.ts +18 -0
- package/dist/src/domain/model/valiant-swap/dtos/ValiantSwapPrepare.dto.js +97 -0
- package/dist/src/domain/model/valiant-swap/dtos/ValiantSwapPrepare.dto.js.map +1 -0
- package/dist/src/domain/model/valiant-swap/dtos/ValiantSwapSubmit.dto.d.ts +4 -0
- package/dist/src/domain/model/valiant-swap/dtos/ValiantSwapSubmit.dto.js +27 -0
- package/dist/src/domain/model/valiant-swap/dtos/ValiantSwapSubmit.dto.js.map +1 -0
- package/dist/src/domain/model/valiant-swap/dtos/index.d.ts +3 -0
- package/dist/src/domain/model/valiant-swap/dtos/index.js +20 -0
- package/dist/src/domain/model/valiant-swap/dtos/index.js.map +1 -0
- package/dist/src/domain/model/valiant-swap/entities/ValiantSwapPrepareResponse.entity.d.ts +4 -0
- package/dist/src/domain/model/valiant-swap/entities/ValiantSwapPrepareResponse.entity.js +27 -0
- package/dist/src/domain/model/valiant-swap/entities/ValiantSwapPrepareResponse.entity.js.map +1 -0
- package/dist/src/domain/model/valiant-swap/entities/ValiantSwapSubmitResponse.entity.d.ts +5 -0
- package/dist/src/domain/model/valiant-swap/entities/ValiantSwapSubmitResponse.entity.js +28 -0
- package/dist/src/domain/model/valiant-swap/entities/ValiantSwapSubmitResponse.entity.js.map +1 -0
- package/dist/src/domain/model/valiant-swap/entities/index.d.ts +2 -0
- package/dist/src/domain/model/valiant-swap/entities/index.js +19 -0
- package/dist/src/domain/model/valiant-swap/entities/index.js.map +1 -0
- package/dist/src/domain/model/valiant-swap/index.d.ts +3 -0
- package/dist/src/domain/model/valiant-swap/index.js +20 -0
- package/dist/src/domain/model/valiant-swap/index.js.map +1 -0
- package/dist/src/domain/model/valiant-swap/types/index.d.ts +39 -0
- package/dist/src/domain/model/valiant-swap/types/index.js +3 -0
- package/dist/src/domain/model/valiant-swap/types/index.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/src/utils/isSVMBlockchain.d.ts +2 -0
- package/dist/src/utils/isSVMBlockchain.js +9 -0
- package/dist/src/utils/isSVMBlockchain.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,70 @@
|
|
|
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.ValiantSwapGetPriceDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const constants_1 = require("../../../constants");
|
|
16
|
+
const validations_1 = require("../../../validations");
|
|
17
|
+
class ValiantSwapGetPriceDto {
|
|
18
|
+
}
|
|
19
|
+
exports.ValiantSwapGetPriceDto = ValiantSwapGetPriceDto;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], ValiantSwapGetPriceDto.prototype, "poolId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], ValiantSwapGetPriceDto.prototype, "mintFrom", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], ValiantSwapGetPriceDto.prototype, "mintTo", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_transformer_1.Transform)(({ value }) => BigInt(value)),
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
(0, class_validator_1.Validate)(validations_1.MinBigInt),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], ValiantSwapGetPriceDto.prototype, "amountIn", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_transformer_1.Transform)(({ value }) => BigInt(value)),
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.Validate)(validations_1.MinBigInt),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], ValiantSwapGetPriceDto.prototype, "amountOut", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsNumber)(),
|
|
49
|
+
(0, class_validator_1.Max)(10000),
|
|
50
|
+
(0, class_validator_1.Min)(0),
|
|
51
|
+
(0, class_validator_1.IsOptional)(),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], ValiantSwapGetPriceDto.prototype, "slippageBps", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_validator_1.IsString)(),
|
|
56
|
+
(0, class_validator_1.IsEnum)(constants_1.SwapType),
|
|
57
|
+
(0, class_validator_1.IsOptional)(),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], ValiantSwapGetPriceDto.prototype, "swapType", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_validator_1.IsNumber)(),
|
|
62
|
+
(0, class_validator_1.IsOptional)(),
|
|
63
|
+
__metadata("design:type", Number)
|
|
64
|
+
], ValiantSwapGetPriceDto.prototype, "decimalsFrom", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, class_validator_1.IsNumber)(),
|
|
67
|
+
(0, class_validator_1.IsOptional)(),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], ValiantSwapGetPriceDto.prototype, "decimalsTo", void 0);
|
|
70
|
+
//# sourceMappingURL=ValiantSwapGetPrice.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValiantSwapGetPrice.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/valiant-swap/dtos/ValiantSwapGetPrice.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAC9C,qDASyB;AACzB,kDAA8C;AAC9C,sDAAiD;AAEjD,MAAa,sBAAsB;CAyClC;AAzCD,wDAyCC;AAtCC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACI;AAIjB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACE;AAKf;IAHC,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;AAKlB;IAHC,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;;yDACD;AAMnB;IAJC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,KAAK,CAAC;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,4BAAU,GAAE;;2DACQ;AAKrB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,oBAAQ,CAAC;IAChB,IAAA,4BAAU,GAAE;;wDACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACS;AAItB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACO"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TxPriorityDto } from '../../tx';
|
|
2
|
+
import { SwapType } from '../../../constants';
|
|
3
|
+
export declare class ValiantSwapPrepareDto {
|
|
4
|
+
sender: string;
|
|
5
|
+
session?: string;
|
|
6
|
+
poolId: string;
|
|
7
|
+
mintFrom: string;
|
|
8
|
+
mintTo: string;
|
|
9
|
+
amountIn: string;
|
|
10
|
+
amountOut: string;
|
|
11
|
+
swapType?: SwapType;
|
|
12
|
+
feeAmount?: string;
|
|
13
|
+
feeBps?: number;
|
|
14
|
+
feeMintAddress: string;
|
|
15
|
+
priorityFee?: number;
|
|
16
|
+
priority?: TxPriorityDto;
|
|
17
|
+
slippageBps?: number;
|
|
18
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
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.ValiantSwapPrepareDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const validations_1 = require("../../../validations");
|
|
16
|
+
const tx_1 = require("../../tx");
|
|
17
|
+
const constants_1 = require("../../../constants");
|
|
18
|
+
class ValiantSwapPrepareDto {
|
|
19
|
+
}
|
|
20
|
+
exports.ValiantSwapPrepareDto = ValiantSwapPrepareDto;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], ValiantSwapPrepareDto.prototype, "sender", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ValiantSwapPrepareDto.prototype, "session", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], ValiantSwapPrepareDto.prototype, "poolId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], ValiantSwapPrepareDto.prototype, "mintFrom", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], ValiantSwapPrepareDto.prototype, "mintTo", 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
|
+
], ValiantSwapPrepareDto.prototype, "amountIn", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_transformer_1.Transform)(({ value }) => BigInt(value)),
|
|
54
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
55
|
+
(0, class_validator_1.Validate)(validations_1.MinBigInt),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], ValiantSwapPrepareDto.prototype, "amountOut", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsString)(),
|
|
60
|
+
(0, class_validator_1.IsEnum)(constants_1.SwapType),
|
|
61
|
+
(0, class_validator_1.IsOptional)(),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], ValiantSwapPrepareDto.prototype, "swapType", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_transformer_1.Transform)(({ value }) => value ?? BigInt(value)),
|
|
66
|
+
(0, class_validator_1.IsOptional)(),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], ValiantSwapPrepareDto.prototype, "feeAmount", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsNumber)(),
|
|
71
|
+
(0, class_validator_1.Max)(10000),
|
|
72
|
+
(0, class_validator_1.Min)(0),
|
|
73
|
+
(0, class_validator_1.IsOptional)(),
|
|
74
|
+
__metadata("design:type", Number)
|
|
75
|
+
], ValiantSwapPrepareDto.prototype, "feeBps", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, class_validator_1.IsString)(),
|
|
78
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], ValiantSwapPrepareDto.prototype, "feeMintAddress", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, class_validator_1.IsNumber)(),
|
|
83
|
+
(0, class_validator_1.IsOptional)(),
|
|
84
|
+
__metadata("design:type", Number)
|
|
85
|
+
], ValiantSwapPrepareDto.prototype, "priorityFee", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, class_transformer_1.Type)(() => tx_1.TxPriorityDto),
|
|
88
|
+
(0, class_validator_1.ValidateNested)(),
|
|
89
|
+
(0, class_validator_1.IsOptional)(),
|
|
90
|
+
__metadata("design:type", tx_1.TxPriorityDto)
|
|
91
|
+
], ValiantSwapPrepareDto.prototype, "priority", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, class_validator_1.IsNumber)(),
|
|
94
|
+
(0, class_validator_1.IsOptional)(),
|
|
95
|
+
__metadata("design:type", Number)
|
|
96
|
+
], ValiantSwapPrepareDto.prototype, "slippageBps", void 0);
|
|
97
|
+
//# sourceMappingURL=ValiantSwapPrepare.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValiantSwapPrepare.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/valiant-swap/dtos/ValiantSwapPrepare.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAoD;AACpD,qDAUyB;AACzB,sDAAiD;AACjD,iCAAyC;AACzC,kDAA8C;AAE9C,MAAa,qBAAqB;CA8DjC;AA9DD,sDA8DC;AA3DC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACI;AAIjB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uDACI;AAIjB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACE;AAKf;IAHC,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;AAKjB;IAHC,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;AAKlB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,oBAAQ,CAAC;IAChB,IAAA,4BAAU,GAAE;;uDACO;AAIpB;IAFC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;IAChD,IAAA,4BAAU,GAAE;;wDACM;AAMnB;IAJC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,KAAK,CAAC;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,4BAAU,GAAE;;qDACG;AAIhB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6DACU;AAIvB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACQ;AAKrB;IAHC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,kBAAa,CAAC;IACzB,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,GAAE;8BACF,kBAAa;uDAAC;AAIzB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACQ"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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.ValiantSwapSubmitDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class ValiantSwapSubmitDto {
|
|
15
|
+
}
|
|
16
|
+
exports.ValiantSwapSubmitDto = ValiantSwapSubmitDto;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], ValiantSwapSubmitDto.prototype, "signedTransaction", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ValiantSwapSubmitDto.prototype, "token", void 0);
|
|
27
|
+
//# sourceMappingURL=ValiantSwapSubmit.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValiantSwapSubmit.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/valiant-swap/dtos/ValiantSwapSubmit.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AAEvD,MAAa,oBAAoB;CAQhC;AARD,oDAQC;AALC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACa;AAI1B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ValiantSwapPrepare.dto"), exports);
|
|
18
|
+
__exportStar(require("./ValiantSwapSubmit.dto"), exports);
|
|
19
|
+
__exportStar(require("./ValiantSwapGetPrice.dto"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/domain/model/valiant-swap/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,0DAAwC;AACxC,4DAA0C"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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.ValiantSwapPrepareResponse = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class ValiantSwapPrepareResponse {
|
|
15
|
+
}
|
|
16
|
+
exports.ValiantSwapPrepareResponse = ValiantSwapPrepareResponse;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], ValiantSwapPrepareResponse.prototype, "serializedTx", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ValiantSwapPrepareResponse.prototype, "token", void 0);
|
|
27
|
+
//# sourceMappingURL=ValiantSwapPrepareResponse.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValiantSwapPrepareResponse.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/valiant-swap/entities/ValiantSwapPrepareResponse.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AAEvD,MAAa,0BAA0B;CAQtC;AARD,gEAQC;AALC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;gEACQ;AAIrB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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.ValiantSwapSubmitResponse = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const constants_1 = require("../../../constants");
|
|
15
|
+
class ValiantSwapSubmitResponse {
|
|
16
|
+
}
|
|
17
|
+
exports.ValiantSwapSubmitResponse = ValiantSwapSubmitResponse;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsString)(),
|
|
20
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], ValiantSwapSubmitResponse.prototype, "transactionSignature", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsEnum)(constants_1.TxStatus),
|
|
25
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], ValiantSwapSubmitResponse.prototype, "status", void 0);
|
|
28
|
+
//# sourceMappingURL=ValiantSwapSubmitResponse.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValiantSwapSubmitResponse.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/valiant-swap/entities/ValiantSwapSubmitResponse.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAC/D,kDAA8C;AAE9C,MAAa,yBAAyB;CAQrC;AARD,8DAQC;AALC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uEACgB;AAI7B;IAFC,IAAA,wBAAM,EAAC,oBAAQ,CAAC;IAChB,IAAA,4BAAU,GAAE;;yDACI"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ValiantSwapPrepareResponse.entity"), exports);
|
|
18
|
+
__exportStar(require("./ValiantSwapSubmitResponse.entity"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/domain/model/valiant-swap/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAoD;AACpD,qEAAmD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./dtos"), exports);
|
|
18
|
+
__exportStar(require("./entities"), exports);
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/domain/model/valiant-swap/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,6CAA2B;AAC3B,0CAAwB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Connection, VersionedTransaction } from '@solana/web3.js';
|
|
2
|
+
export type ValiantPriceRequest = {
|
|
3
|
+
connection: Connection;
|
|
4
|
+
mintFrom: string;
|
|
5
|
+
mintTo: string;
|
|
6
|
+
amountIn?: string | bigint;
|
|
7
|
+
amountOut?: string | bigint;
|
|
8
|
+
isExactIn?: boolean;
|
|
9
|
+
poolId?: string;
|
|
10
|
+
targetPool?: string;
|
|
11
|
+
slippageBps?: number;
|
|
12
|
+
swapType?: string;
|
|
13
|
+
decimalsIn?: number;
|
|
14
|
+
decimalsOut?: number;
|
|
15
|
+
decimalsFrom?: number;
|
|
16
|
+
decimalsTo?: number;
|
|
17
|
+
rpcUrl: string;
|
|
18
|
+
};
|
|
19
|
+
export type ValiantSwapRequest = {
|
|
20
|
+
sender: string;
|
|
21
|
+
session?: string;
|
|
22
|
+
payer?: string;
|
|
23
|
+
targetPool: string;
|
|
24
|
+
amountIn: bigint;
|
|
25
|
+
mintFrom: string;
|
|
26
|
+
mintTo: string;
|
|
27
|
+
amountOut: bigint;
|
|
28
|
+
slippageBps: number;
|
|
29
|
+
isExactIn?: boolean;
|
|
30
|
+
connection: Connection;
|
|
31
|
+
rpcUrl: string;
|
|
32
|
+
};
|
|
33
|
+
export interface ValiantSwapResponse {
|
|
34
|
+
transaction: VersionedTransaction;
|
|
35
|
+
quote: {
|
|
36
|
+
inputAmount: bigint;
|
|
37
|
+
outputAmount: bigint;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/domain/model/valiant-swap/types/index.ts"],"names":[],"mappings":""}
|
package/dist/src/utils/index.js
CHANGED
|
@@ -19,4 +19,5 @@ __exportStar(require("./curves"), exports);
|
|
|
19
19
|
__exportStar(require("./isAntiSnipeCurve"), exports);
|
|
20
20
|
__exportStar(require("./isFlatCurveV1"), exports);
|
|
21
21
|
__exportStar(require("./isMeteoraMigrationDex"), exports);
|
|
22
|
+
__exportStar(require("./isSVMBlockchain"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB;AACzB,qDAAmC;AACnC,kDAAgC;AAChC,0DAAwC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB;AACzB,qDAAmC;AACnC,kDAAgC;AAChC,0DAAwC;AACxC,oDAAkC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isSVMBlockchain = void 0;
|
|
4
|
+
const blockchain_1 = require("../domain/constants/blockchain");
|
|
5
|
+
const isSVMBlockchain = (symbol) => {
|
|
6
|
+
return symbol === blockchain_1.BlockchainSymbol.FOGO || symbol === blockchain_1.BlockchainSymbol.SOL;
|
|
7
|
+
};
|
|
8
|
+
exports.isSVMBlockchain = isSVMBlockchain;
|
|
9
|
+
//# sourceMappingURL=isSVMBlockchain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSVMBlockchain.js","sourceRoot":"","sources":["../../../src/utils/isSVMBlockchain.ts"],"names":[],"mappings":";;;AAAA,+DAAkE;AAE3D,MAAM,eAAe,GAAG,CAAC,MAAwB,EAAW,EAAE;IACnE,OAAO,MAAM,KAAK,6BAAgB,CAAC,IAAI,IAAI,MAAM,KAAK,6BAAgB,CAAC,GAAG,CAAC;AAC7E,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B"}
|